[rabbitmq-discuss] JSON dependency for codegen - suggestion
Holger Hoffstätte
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
tried :(
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>
do_main(generateJavaApi, generateJavaImpl)
File "../rabbitmq-codegen\amqp_codegen.py", line 166, in do_main
header_fn(sys.argv[2])
File "codegen.py", line 387, in generateJavaApi
genJavaApi(AmqpSpec(specPath))
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
such breakage?
> 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.
-h
More information about the rabbitmq-discuss
mailing list