Python 3 exceptions

164 views
Skip to first unread message

Carlos Cesar Caballero Díaz

unread,
Aug 29, 2018, 10:55:55 PM8/29/18
to web2py-d...@googlegroups.com
Hi guys, I am working in an app using Python 3.5 and it's becoming a
hell to work because of so little information in exceptions, there is
something failing in the traceback an only show this kind of stuff:

Traceback (most recent call last):
    File "/home/cccaballero/Software/web2py/gluon/restricted.py", line
219, in restricted exec(ccode, environment)
TypeError: int() argument must be a string, a bytes-like object or a
number, not 'NoneType'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
    File "/home/cccaballero/Software/web2py/gluon/restricted.py", line
141, in __init__ self.traceback = traceback.format_exc()
AttributeError: 'NoneType' object has no attribute 'strip'


Any idea how to fix this?

Greetings.


Massimo DiPierro

unread,
Aug 30, 2018, 2:26:13 AM8/30/18
to web2py-d...@googlegroups.com
can you please open a ticket and reference it. will look over the week end

--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-d...@googlegroups.com
unsubscribe: web2py-develop...@googlegroups.com
details    : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official    : http://www.web2py.com/
---
You received this message because you are subscribed to the Google Groups "web2py-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py-develop...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Carlos Cesar Caballero

unread,
Aug 31, 2018, 6:51:35 PM8/31/18
to web2py-d...@googlegroups.com
Python 3 exceptions give too little information https://github.com/web2py/web2py/issues/1998

Paolo Valleri

unread,
Sep 1, 2018, 3:31:48 AM9/1/18
to web2py-d...@googlegroups.com
Have you tried with higher python versions? 

Il sab 1 set 2018, 00:51 Carlos Cesar Caballero <carlos.c...@cfg.jovenclub.cu> ha scritto:
Python 3 exceptions give too little information https://groups.google.com/forum/#!topic/web2py-developers/uiQ_RwAQ-bs

Carlos Cesar Caballero Díaz

unread,
Sep 1, 2018, 1:01:50 PM9/1/18
to web2py-d...@googlegroups.com

Tested with Python 3.6 and 3.7 and the issue remains. https://github.com/web2py/web2py/issues/1998#issuecomment-417872388


El 01/09/18 a las 03:31, Paolo Valleri escribió:

Brian Meredyk

unread,
Jan 30, 2019, 9:54:13 PM1/30/19
to web2py-developers
This still seems to be a problem as I'm running into it with Python 3.7.2 on Windows 7 and fresh copy of web2py source. Many error tickets just end up with something like below which isn't helpful.

Traceback (most recent call last
):
File "C:\FMSC_py3\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
ModuleNotFoundError: No module named '__restricted__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last
):
File "C:\FMSC_py3\web2py\gluon\restricted.py", line 141, in __init__

self.traceback = traceback.format_exc()
AttributeError: 'NoneType' object has no attribute 'strip'
Reply all
Reply to author
Forward
0 new messages