[rabbitmq-discuss] JSON dependency for codegen - suggestion
holger at wizards.de
Wed Nov 19 21:57:57 GMT 2008
Replying to myself as usual ;)
> I decided to check out what's new in the Java client, but oh noes! Python
> errors. So I tried the same with the server and got the helpful message
> that JSON is now required. Dropping that into the codegen project worked
> for building the broker but not for the Java client lib, apparently since
> the parent codegen script is called directly and json.py is not on the
> relative path..or something like that.
Nope..the codegen project is appended to the python path and dropping the
json.py in there works just fine for both the broker and the java client
projects...just not with python 2.6 on Windows, which is of course what I
C:\home\holger\Projects\rabbitmq-java-client\build.xml:55: Generation of
AMQP.java failed with message:
Traceback (most recent call last):
File "codegen.py", line 393, in <module>
File "../rabbitmq-codegen\amqp_codegen.py", line 166, in do_main
File "codegen.py", line 387, in generateJavaApi
File "../rabbitmq-codegen\amqp_codegen.py", line 48, in __init__
self.spec = json.read(file(filename).read())
AttributeError: 'module' object has no attribute 'read'
Any python wiz who knows what changed from 2.5 to 2.6 that could cause
> Would it be possible to add the json.py to the -codegen project? That
> would make things much easier, probably also for the other client libs.
That would still be nice, provided we can figure out how to make it work
with python 2.6.
More information about the rabbitmq-discuss