We're occasionally seeing this exception thrown out of 
mapper.configure_mappers when using SQLSoup in our webapp:

  File 
"/home/glados/.virtualenvs/pod-glance/local/lib/python2.7/site-packages/sqlsoup.py"
, line 455, in __getattr__
    return self.entity(attr)
  File 
"/home/glados/.virtualenvs/pod-glance/local/lib/python2.7/site-packages/sqlsoup.py"
, line 452, in entity
    return self.map_to(attr, tablename=attr, schema=schema)
  File 
"/home/glados/.virtualenvs/pod-glance/local/lib/python2.7/site-packages/sqlsoup.py"
, line 363, in map_to
    mapper_args
  File 
"/home/glados/.virtualenvs/pod-glance/local/lib/python2.7/site-packages/sqlsoup.py"
, line 172, in _class_for_table
    for k in mappr.iterate_properties:
  File 
"/home/glados/.virtualenvs/pod-glance/local/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py"
, line 1819, in iterate_properties
    configure_mappers()
  File 
"/home/glados/.virtualenvs/pod-glance/local/lib/python2.7/site-packages/sqlalchemy/orm/mapper.py"
, line 2677, in configure_mappers
    for mapper in list(_mapper_registry):
  File "/usr/lib/python2.7/weakref.py", line 327, in iterkeys
    for wr in self.data.iterkeys():
RuntimeError: dictionary changed size during iteration

I saw a previous thread about this 
<https://groups.google.com/forum/#!searchin/sqlalchemy/%22RuntimeError$3A$20dictionary$20changed$20size$20during$20iteration%22/sqlalchemy/Qcwzn_GqUdQ/7n28bZqfPKYJ>
 and 
indeed we are creating new SQLSoup instances per request not per process. 
 But I also note that since then, it seems that sqlalchemy does use 
a _CONFIGURE_MUTEX to avoid unsynchronized reference to _mapper_registry.

Any idea what might be causing this?

Thanks,
Chung

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to