Found out it's was a python 3.7 vs 2.7 when dealing with syringIO.
I managed to change code at module images.py to
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
This was instead of
import cStringIO
Now a new form error, error comes still when uploading :
image.resize
What could be wrong with this.
On Sun, 6 Oct 2019, 10:18 Maurice Waka <[email protected]> wrote:
> I was looking for a good image app and came across this link
> <http://www.web2pyref.com/reference/gallery-web2py-image-gallery-application>
> .
> After uploading it, on trying to upload an image, I get this error:
> Traceback (most recent call last):
> File "/home/mauricewaka/web2py/gluon/restricted.py", line 219, in
> restricted
> exec(ccode, environment)
> File
> "/home/mauricewaka/web2py/applications/w2p_gallery/controllers/default.py"
> <http://127.0.0.1:8000/admin/default/edit/w2p_gallery/controllers/default.py>
> , line 176, in <module>
> File "/home/mauricewaka/web2py/gluon/globals.py", line 421, in <lambda>
> self._caller = lambda f: f()
> File "/home/mauricewaka/web2py/gluon/tools.py", line 3869, in f
> return action(*a, **b)
> File
> "/home/mauricewaka/web2py/applications/w2p_gallery/controllers/default.py"
> <http://127.0.0.1:8000/admin/default/edit/w2p_gallery/controllers/default.py>
> , line 124, in edit_image
> if form.accepts(request.vars, session):
> File "/home/mauricewaka/web2py/gluon/sqlhtml.py", line 1785, in accepts
> **kwargs
> File "/home/mauricewaka/web2py/gluon/html.py", line 2149, in accepts
> status = self._traverse(status, hideerror)
> File "/home/mauricewaka/web2py/gluon/html.py", line 910, in _traverse
> newstatus = c._traverse(status, hideerror) and newstatus
> File "/home/mauricewaka/web2py/gluon/html.py", line 910, in _traverse
> newstatus = c._traverse(status, hideerror) and newstatus
> File "/home/mauricewaka/web2py/gluon/html.py", line 910, in _traverse
> newstatus = c._traverse(status, hideerror) and newstatus
> [Previous line repeated 1 more time]
> File "/home/mauricewaka/web2py/gluon/html.py", line 917, in _traverse
> newstatus = self._validate()
> File "/home/mauricewaka/web2py/gluon/html.py", line 1895, in _validate
> raise Exception(msg)
> Exception: Validation error, field:file <applications.w2p_gallery.modules.
> images.RESIZE object at 0x7f85ff5cf7b8>
>
> How do I solve this error.
> Kind regards
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/PqXEKxIBD1w/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/47606eb6-6e46-4935-a198-1fb4773585c4%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/47606eb6-6e46-4935-a198-1fb4773585c4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/CALkNK55LJ%3D8fGR1%3DP0C9dZrc6zqpr7bJRbYE6U8eDrrmeLHqpA%40mail.gmail.com.