load fails with AssertionError: "assert '\\' not in type_str"

Bug #1125447 reported by Gary Miguel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Meliae
Incomplete
Undecided
Unassigned

Bug Description

My code uses pytz (http://pytz.sourceforge.net/), which has type names like 'US/Pacific':
>>> pytz.timezone('US/Pacific').__class__.__name__
'US/Pacific'

Revision history for this message
Gary Miguel (garymm) wrote :

At least for my case, removing the assertions seems to have done the trick, but I haven't looked through the code enough to know if there's actually a valid reason for them being there.

Revision history for this message
Martin Pool (mbp) wrote :

Can you post the actual traceback?

Revision history for this message
Martin Pool (mbp) wrote :

Gary told me offline he couldn't reproduce this. It might have been implicitly fixed by me changing our build to use simplejson.

Changed in meliae:
status: New → Incomplete
Revision history for this message
Adam Coddington (yatc18ks0g8zofezrp-me) wrote :

I can confirm that this is a problem I'm currently experiencing. Commenting out the assertions, though, does allow me to work around the problem.

```
Traceback (most recent call last): 2.3 / 146.7 MiB read in 0.9s
  File "/home/acoddington/pyrasite/bin/pyrasite-memory-viewer", line 9, in <module>
    load_entry_point('pyrasite==2.0', 'console_scripts', 'pyrasite-memory-viewer')()
  File "/home/acoddington/pyrasite/lib/python2.7/site-packages/pyrasite/tools/memory_viewer.py", line 150, in main
    objects = loader.load(filename)
  File "/home/acoddington/pyrasite/meliae-0.4.0/meliae/loader.py", line 542, in load
    max_parents=max_parents)
  File "/home/acoddington/pyrasite/meliae-0.4.0/meliae/loader.py", line 621, in _load
    factory=objs.add):
  File "/home/acoddington/pyrasite/meliae-0.4.0/meliae/loader.py", line 601, in iter_objs
    yield decoder(factory, line, temp_cache=temp_cache)
  File "/home/acoddington/pyrasite/meliae-0.4.0/meliae/loader.py", line 89, in _from_line
    assert '\\' not in type_str, type_str
AssertionError: Etc\/UTC
```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.