I have all my code in modules packaged up into a zip file.
When I run my script, then make changes and upload a new zip file, any attempts to re-run the script result in a zip error:
Traceback (most recent call last):
File “”, line 6, in ?
zipimport.ZipImportError: bad local file header in WEB/python/mymodule.zip
Once I reboot the gateway everything works again. This is making development very painful because I have to reboot the gateway every time a make a change.
I believe that this is one of that known limitations of the system. See this page on the Digi developer site for brief notes on this and other common errors:
It allows the main routine to force a clear & reload the ZIP. I haven’t tried it.
My fix for this is to do heavy “unit test” on a PC of anything not Xbee related, plus even modules geared towards XBee can be split into 2 distinct files, so one can be run part of the code on a PC.