CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 14, 2019, 00:08:58 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Cambam Python script does not import some standard modules when running in Linux  (Read 1204 times)
kpap
CNC Ewok
*
Offline Offline

Posts: 25


View Profile
« on: February 17, 2019, 11:58:38 am »

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?
Logged
Dragonfly
CNC Jedi
*****
Offline Offline

Posts: 2224



View Profile
« Reply #1 on: February 17, 2019, 15:05:56 pm »

Gives the same error here. But I have no idea why?
Logged
kpap
CNC Ewok
*
Offline Offline

Posts: 25


View Profile
« Reply #2 on: February 17, 2019, 16:05:36 pm »

It seems that this error is printed instead of the actual exception message. Enclosing in an exception handler revealed the truth:
Code:
try:
    import os
except Exception, e:
    print e

Code:
IronPython.Runtime.Exceptions.ImportException: No module named errno
Logged
onekk
Wookie
****
Offline Offline

Posts: 497


View Profile
« Reply #3 on: February 22, 2019, 11:44:37 am »

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.
Logged

Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.082 seconds with 19 queries.

Copyright © 2018 HexRay Ltd. | Sitemap