Shouldn't this warrant a new release? The last stable release is 2.16.1 and 
the import is missing there.

On Saturday, December 16, 2017 at 3:47:06 PM UTC-6, Massimo Di Pierro wrote:
>
> fixed on gitghub. thanks for reporting it.
>
> On Thursday, 7 December 2017 06:26:33 UTC-6, Ryan Herbert wrote:
>>
>> I found this issue: https://github.com/web2py/pydal/issues/498 which 
>> denotes my exact problem, so it should be fixed soon (?). Not entirely sure 
>> why this issue didn't come up when searching my error on google...
>>
>> On Wednesday, 6 December 2017 16:39:11 UTC+1, Ryan Herbert wrote:
>>>
>>> Hello,
>>> I am currently experiencing an issue with my scheduler workers crashing 
>>> on startup with the following error:
>>>
>>> Exception in thread Thread-1:
>>> Traceback (most recent call last):
>>>   File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
>>>     self.run()
>>>   File "/usr/share/vidjil/server/web2py/gluon/scheduler.py", line 637, 
>>> in run
>>>     self.send_heartbeat(counter)
>>>   File "/usr/share/vidjil/server/web2py/gluon/scheduler.py", line 1161, 
>>> in send_heartbeat
>>>     self.db._uri, folder=self.db._adapter.folder, decode_credentials=
>>> True)
>>>   File 
>>> "/usr/share/vidjil/server/web2py/gluon/packages/dal/pydal/base.py", 
>>> line 169, in __call__
>>>     obj = super(MetaDAL, cls).__call__(*args, **kwargs)
>>>   File 
>>> "/usr/share/vidjil/server/web2py/gluon/packages/dal/pydal/base.py", 
>>> line 474, in __init__
>>>     "Failure to connect, tried %d times:\n%s" % (attempts, tb)
>>> RuntimeError: Failure to connect, tried 5 times:
>>> Traceback (most recent call last):
>>>   File 
>>> "/usr/share/vidjil/server/web2py/gluon/packages/dal/pydal/base.py", 
>>> line 454, in __init__
>>>     self._adapter = adapter(**kwargs)
>>>   File 
>>> "/usr/share/vidjil/server/web2py/gluon/packages/dal/pydal/adapters/__init__.py"
>>> , line 40, in __call__
>>>     obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
>>>   File 
>>> "/usr/share/vidjil/server/web2py/gluon/packages/dal/pydal/adapters/base.py"
>>> , line 368, in __init__
>>>     super(SQLAdapter, self).__init__(*args, **kwargs)
>>>   File 
>>> "/usr/share/vidjil/server/web2py/gluon/packages/dal/pydal/adapters/base.py"
>>> , line 50, in __init__
>>>     self._initialize_(do_connect)
>>>   File 
>>> "/usr/share/vidjil/server/web2py/gluon/packages/dal/pydal/adapters/mysql.py"
>>> , line 24, in _initialize_
>>>     user = self.credential_decoder(m.group('user'))
>>>   File 
>>> "/usr/share/vidjil/server/web2py/gluon/packages/dal/pydal/base.py", 
>>> line 403, in <lambda>
>>>     credential_decoder = lambda cred: urllib.unquote(cred)
>>> NameError: global name 'urllib' is not defined
>>>
>>> The workers are running inside a docker container and are started with 
>>> the following command:
>>> /usr/local/bin/gosu www-data python web2py.py -K myapp
>>>
>>>
>>> I have made sure urllib is correctly installed, and as far as I can 
>>> tell, it is. Or at least running a python shell and importing the module 
>>> works. Does anyone have any insight as to why this might be happening ?
>>>
>>> Thanks
>>>
>>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to