You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Disclaimer: (1)Just starting out with Bottle framework, in attempt to create simple, web-based access to local database, and (2) no professional Python coder.)
Issue: When I enable the auto-reloader with the "run(reloader=True)" command on my Ubuntu box (2.6.32-38, 64bit):
with Python 2.6: all works as expected
with Python 3.2.2: a RuntimeError appears, and the auto-reloader obviously does not start. Here's the error:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/me/programs/Python-3.2.2/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/home/me/python/bottle_webFramework/myScripts/bottle.py", line 2507, in run
for module in sys.modules.values():
RuntimeError: dictionary changed size during iteration
Error can be solved (and functional reloader obtained, as expected), by explicitly declaring as a list in lines 2507 and 2517, but this is probably a dirty workaround only (I'm not familiar with system level thread checks...):
@ 2507
--- for module in sys.modules.values():
+++ for module in list(sys.modules.values()):
@ 2517
--- for path, lmtime in files.items():
+++ for path, lmtime in list(files.items()):
Hope this helps,
thanks for a nice, simple webframework!
The text was updated successfully, but these errors were encountered:
(Disclaimer: (1)Just starting out with Bottle framework, in attempt to create simple, web-based access to local database, and (2) no professional Python coder.)
Issue: When I enable the auto-reloader with the "run(reloader=True)" command on my Ubuntu box (2.6.32-38, 64bit):
with Python 2.6: all works as expected
with Python 3.2.2: a RuntimeError appears, and the auto-reloader obviously does not start. Here's the error:
Error can be solved (and functional reloader obtained, as expected), by explicitly declaring as a list in lines 2507 and 2517, but this is probably a dirty workaround only (I'm not familiar with system level thread checks...):
@ 2507
--- for module in sys.modules.values():
+++ for module in list(sys.modules.values()):
@ 2517
--- for path, lmtime in files.items():
+++ for path, lmtime in list(files.items()):
Hope this helps,
thanks for a nice, simple webframework!
The text was updated successfully, but these errors were encountered: