Getting started - python.zip

Hi everybody,

To improve my knowledge of Dia, I have followed the “getting started” of digi.

So I can run the dia.py on my local machine and I can execute the different queries.

But when I upload the dia.py and dia.zip on my gateway and that I try to run it (from a telnet), I receive the error message :
“Unable to import ‘os’ module. Check that your system has a ‘python.zip’ file,
and that it is the correct one for your device.”

After researches on the web, I find a python.zip file on digi support web site (with os.pyc inside). I try to upload them and I receive an error message “not enough memory”.

How can I slove this problem?

Thank you very much.

Grigou

Hi,

While making Dia project, you can uncheck RCI, WebUI to overcome this problem.

Thank you for the response,

I realise the dia project on the cmd.exe with “python make.py cfg\dia.yml”, so I don’t understand how I can uncheck RCI, WebUI to overcome this problem.

Could you give me a little more precision?

Thank you very much.

Grigou

That mean, when you make new dia project from digi ESP for python, you will get the .yml window. In that window you can uncheck webUI and RCI.

Ok, but I don’t actually work with ESP. I try to do with cmd.exe and I have this problem.

Grigou

Hi,

Digi ESP for Python is the best tool to use to reduce the developement efforts. Even if you want to use cmd or if you are using directly built in dia libraries to make your application, than I would suggest, that contact Digi Support from E-Service Portal.

Looks like you may have filled up the FLASH, or have an older unit. The Digi ConnectPort X2 has limited resources, so cannot run some of the larger presentations. Some older X4/X8 also only have 16MB RAM (most today have 32MB).

Also, many large public Python modules (like SQL or fancier XML tools) won’t be able to run with 100’s of MB of virtual RAM - we have none :slight_smile:

Perhaps you can explain more about your gateway.