Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1225 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

RuntimeError: dictionary changed size during iteration

Reported by: guest Owned by: alberto
Priority: normal Milestone:
Component: TurboGears Version: 1.0b2
Severity: normal Keywords:
Cc:

Description

After upgrading to TG 1.0 autoreload doesnt work for me anymore. When starting any/quickstarted project with autoreloading, I get the following traceback:

$ ./start-blah.py 
2007-01-04 12:01:05,585 cherrypy.msg INFO CONFIG: Server parameters:
2007-01-04 12:01:05,586 cherrypy.msg INFO CONFIG:   server.environment: development
2007-01-04 12:01:05,587 cherrypy.msg INFO CONFIG:   server.log_to_screen: True
2007-01-04 12:01:05,588 cherrypy.msg INFO CONFIG:   server.log_file: 
2007-01-04 12:01:05,588 cherrypy.msg INFO CONFIG:   server.log_tracebacks: True
2007-01-04 12:01:05,589 cherrypy.msg INFO CONFIG:   server.log_request_headers: True
2007-01-04 12:01:05,589 cherrypy.msg INFO CONFIG:   server.protocol_version: HTTP/1.0
2007-01-04 12:01:05,590 cherrypy.msg INFO CONFIG:   server.socket_host: 
2007-01-04 12:01:05,590 cherrypy.msg INFO CONFIG:   server.socket_port: 8081
2007-01-04 12:01:05,591 cherrypy.msg INFO CONFIG:   server.socket_file: 
2007-01-04 12:01:05,591 cherrypy.msg INFO CONFIG:   server.reverse_dns: False
2007-01-04 12:01:05,625 cherrypy.msg INFO CONFIG:   server.socket_queue_size: 5
2007-01-04 12:01:05,626 cherrypy.msg INFO CONFIG:   server.thread_pool: 10
Traceback (most recent call last):
  File "./start-blah.py", line 25, in ?
    start_server(Root())
  File "/Users/ksenia/www/3rdparty/jail/tg/turbogears/startup.py", line 300, in start_server
    cherrypy.server.start()
  File "/Users/ksenia/www/3rdparty/jail/working-env/lib/python2.4/CherryPy-2.2.1-py2.4.egg/cherrypy/_cpserver.py", line 72, in start
    Engine.start(self)
  File "/Users/ksenia/www/3rdparty/jail/working-env/lib/python2.4/CherryPy-2.2.1-py2.4.egg/cherrypy/_cpengine.py", line 91, in start
    autoreload.main(self._start, freq=freq)
  File "/Users/ksenia/www/3rdparty/jail/working-env/lib/python2.4/CherryPy-2.2.1-py2.4.egg/cherrypy/lib/autoreload.py", line 59, in main
    reloader_thread(freq)
  File "/Users/ksenia/www/3rdparty/jail/tg/turbogears/startup.py", line 50, in reloader_thread
    modlist = [modules[modname] for modname in modules if modname.startswith(package)]
RuntimeError: dictionary changed size during iteration
2007-01-04 12:01:05,837 cherrypy.msg INFO ENGINE: SystemExit raised: shutting down autoreloader
2007-01-04 12:01:05,839 cherrypy.msg INFO HTTP: HTTP Server shut down
2007-01-04 12:01:05,871 cherrypy.msg INFO ENGINE: CherryPy shut down

My environment:

  • OS X PowerPC
  • python 2.4
  • tg-admin info:
    TurboGears Complete Version Information 
    
    TurboGears requires: 
    
    * TurboGears 1.0 
    * configobj 4.3.2 
    * RuleDispatch 0.5a0.dev-r2247 
    * setuptools 0.7a1dev-r46389 
    * FormEncode 0.5.1 
    * cElementTree 1.0.5-20051216 
    * PasteScript 0.9.7 
    * elementtree 1.2.6 
    * simplejson 1.3 
    * CherryPy 2.2.1 
    * TurboKid 0.9.8 
    * TurboCheetah 0.9.5 
    * TurboJson 0.9.9 
    * PyProtocols 1.0a0dev-r2082 
    * Cheetah 2.0rc6 
    * PasteDeploy 0.4 
    * Paste 0.4.1 
    * kid 0.9.3 
    * Cheetah 2.0rc6 
    * elementtree 1.2.6 
    
    Identity Providers 
    
    * sqlobject (TurboGears 1.0) 
    * sqlalchemy (TurboGears 1.0) 
    
    tg-admin Commands 
    
    * info (TurboGears 1.0) 
    * shell (TurboGears 1.0) 
    * quickstart (TurboGears 1.0) 
    * update (TurboGears 1.0) 
    * sql (TurboGears 1.0) 
    * i18n (TurboGears 1.0) 
    * toolbox (TurboGears 1.0) 
    
    Visit Managers 
    
    * sqlobject (TurboGears 1.0) 
    * sqlalchemy (TurboGears 1.0) 
    
    Template Engines 
    
    * kid (TurboKid 0.9.8) 
    * cheetah (TurboCheetah 0.9.5) 
    * json (TurboJson 0.9.9) 
    * toscawidgets (ToscaWidgets 0.1a0dev-r2224) 
    * genshi-markup (Genshi 0.3.6) 
    * genshi-text (Genshi 0.3.6) 
    * genshi (Genshi 0.3.6) 
    
    Widget Packages 
    
    * selectshuttle (Select-Shuttle 0.94) 
    
    TurboGears Extensions 
    
    * visit (TurboGears 1.0) 
    * identity (TurboGears 1.0) 
    * fastdata (TGFastData 0.9a6)
    

I've also noticed that when another app is running at the same time on a different port, without using autoreload, the app with autoreload starts just fine and doesnt crash!'''

Change History

comment:1 in reply to: ↑ description Changed 12 years ago by guest

I've also noticed that when another app is running at the same time on a different port, without using autoreload, the app with autoreload starts just fine and doesnt crash!!

Oops, It only happened once and I cant reproduce it again. The app with autoreload.on seems to crash no matter if other apps are running or not.

comment:2 Changed 12 years ago by alberto

  • Status changed from new to assigned
  • Owner changed from anonymous to alberto

This is caused by [2256]. I'll fix it as soon as I get to my dev. machine... for the meantime you can revert that changeset by hand.

Alberto

comment:3 Changed 12 years ago by alberto

  • Status changed from assigned to closed
  • Resolution set to fixed

I've reverted [2256] in [2341]. If the problem still occurs please reopen the ticket.

Thanks :) Alberto

Note: See TracTickets for help on using tickets.