DARcorporation / xrotor-python

Stripped down version of XROTOR as compiled python module
GNU General Public License v3.0
16 stars 9 forks source link

Error Message After Installing Package on Python 3.7.5 and Having MinGW on Path (OSError: [WinError 193] %1 is not a valid Win32 application and 'XRotor' object has no attribute '_lib') #2

Open marcosaantos opened 3 years ago

marcosaantos commented 3 years ago

I ran this line after successfully downloading the XRotor package.

from xrotor import XRotor xr=XRotor()

I have downloaded all the pre-requisites (Python and MinGW as gcc and fortran compiler), but still get problems in running the code above, as is shown in the message below. Do you know what could be causing the error? I have Python 3.7.5 64-bit installed (I tried having its 32-bit version, but the XRotor package could not be downloaded with it).

C:\Users\msantos43\PycharmProjects\Test03\venv\Scripts\python.exe C:/Users/msantos43/PycharmProjects/Test03/Test03.py Traceback (most recent call last): File "C:/Users/msantos43/PycharmProjects/Test03/Test03.py", line 2, in xr=XRotor() File "C:\Users\msantos43\PycharmProjects\Test03\venv\lib\site-packages\xrotor\xrotor.py", line 55, in init self._lib = cdll.LoadLibrary(self._lib_path) File "C:\Users\msantos43\AppData\Local\Programs\Python\Python37\lib\ctypes__init.py", line 442, in LoadLibrary return self._dlltype(name) File "C:\Users\msantos43\AppData\Local\Programs\Python\Python37\lib\ctypes__init.py", line 364, in init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application Exception ignored in: <function XRotor.del at 0x000001C6E2CC0A68> Traceback (most recent call last): File "C:\Users\msantos43\PycharmProjects\Test03\venv\lib\site-packages\xrotor\xrotor.py", line 69, in del__ handle = self._lib._handle AttributeError: 'XRotor' object has no attribute '_lib'

KikeM commented 3 years ago

Hi,

I am not the maintainer of this repository, but I run into a similar issue with another repository whose build process is similar to this one.

See my reply to issue #1, I think both of you have a similar problem.

If the installation finished correctly, the library should be compiled, but it might not be where the code expects so. You might need to look for it and update line 30 on xrotor.py.

Let me know how it goes!