#8555 closed defect (fixed)
AttributeError: 'module' object has no attribute 'dumps' due to simplejson dependency
Reported by: | Jan Beilicke | Owned by: | Richard Liao |
---|---|---|---|
Priority: | normal | Component: | TracTicketTemplatePlugin |
Severity: | major | Keywords: | json dependency |
Cc: | Trac Release: | 0.12 |
Description
At first, thx for the plugin! :)
Unfortunately I cannot get it started in Trac 0.12. After compiling the plugin and setting everything up, I was able to define some basic templates. When trying to create a new ticket, Trac behaves like there is no TracTicketTemplatePlugin installed.
I realized that simplejson is required, so I installed it afterwards. No change.
The trac.log reveals an error:
2011-03-02 09:56:32,863 Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 513, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 235, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-x86_64/egg/tickettemplate/ttadmin.py", line 258, in process_request jsonstr = simplejson.dumps(result) AttributeError: 'module' object has no attribute 'dumps'
Any hint how to solve this issue?
Thx in advance!
Attachments (0)
Change History (6)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Keywords: | json dependency added |
---|---|
Severity: | blocker → major |
Summary: | Plugin not working: AttributeError: 'module' object has no attribute 'dumps' → AttributeError: 'module' object has no attribute 'dumps' due to simplejson dependency |
I've found several json packages non-functional due to this error too.
But after some fiddling with several json variants I've got it to work with just simplejson
on Debian 5.0, IIRC. One year later, now on Debian 6.0, this is no longer needed as the Python standard version is not 2.5 but 2.6 and I confirm that json is provided as a standard module now.
All in all this should really be manageable, not a blocker issue. Nevertheless we should enhance the wiki for all the older distributions still around with Python2.4 and 2.5 in production? Only I can't test anymore, since I've not managed to setup (virtual) test environments with that older Python versions.
comment:3 follow-up: 5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Issue solved by always loading
simplejson
:The machine still got Python 2.5.2 installed.
json
should only be available with Python 2.6 (according to the Python docs). Side note: I was able to installpython-json
on the system and it was used somehow:The ticket can be closed, except you want to address this compatibility issue somehow.