Menu

#464 test Python interpreter version at module import

PCRaster
closed
nobody
None
1
2019-06-21
2013-12-10
No

while using a wrong Python version users might end up with something like

Traceback (most recent call last):
  File "C:\Users\Gebruiker\Documents\6e Jaar\Python course\dynmod\snowmelt\dynMod.py", line 1, in <module>
    from pcraster import *
  File "C:\Program Files\PCRaster\Python\pcraster.py", line 5, in <module>
    from PCRaster.operations import *
  File "C:\Program Files\PCRaster\Python\PCRaster\__init__.py", line 1, in <module>
    from operations import *
  File "C:\Program Files\PCRaster\Python\PCRaster\operations.py", line 3, in <module>
    import PCRaster._PCRaster as _PCRaster
ImportError: DLL load failed: Kan opgegeven module niet vinden.

while path settings as given in the docs are fine. We could check the used Python interpreter version and raise a more informative/userfriendly ImportError message to aid users in solving the issue

Discussion

  • Oliver Schmitz

    Oliver Schmitz - 2014-01-13
    • Group: PCRaster-4.0 --> PCRaster
     
  • Kor de Jong

    Kor de Jong - 2014-01-21
    • assigned_to: Oliver Schmitz --> nobody
     
  • Oliver Schmitz

    Oliver Schmitz - 2019-06-21
    • status: open --> closed
     

Log in to post a comment.