Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Dec 8, 2020 · 1 comment

Comments

@marcosaantos
Copy link

marcosaantos commented Dec 8, 2020

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
Copy link

KikeM commented Jan 4, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants