Author Topic: Cambam Python script does not import some standard modules when running in Linux  (Read 1642 times)

Offline kpap

  • Ewok
  • *
  • Posts: 25
    • View Profile
I have some Python scripts that I developed for Cambam running in Windows, but I cannot run these in Linux. IronPython gives error messages "Value cannot be null" and "Parameter name: method" when, for example, trying to import the modules "os" or "math".

Any ideas why and what can be done?

Offline Dragonfly

  • CNC Jedi
  • *****
  • Posts: 2311
    • View Profile
Gives the same error here. But I have no idea why?

Offline kpap

  • Ewok
  • *
  • Posts: 25
    • View Profile
It seems that this error is printed instead of the actual exception message. Enclosing in an exception handler revealed the truth:
Code: [Select]
try:
    import os
except Exception, e:
    print e

Code: [Select]
IronPython.Runtime.Exceptions.ImportException: No module named errno

Offline onekk

  • CNC Jedi
  • *****
  • Posts: 510
    • View Profile
CamBam uses IronPython and maybe the implementation differs from Windows and Linux.

From the my little knowledge Ironpython is a python interpreter on top of C# and maybe the fact that in Linux the underlying implementation is done by Mono may modify some "standard" behaviour, not exposing properly some modules.

Maybe some IronPython documentation may make some light on this behaviour that seems not to be related to CamBam itself.

Regards

Carlo D.
Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam