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

pypowsybl crashes python kernel on import #802

Closed
awarsewa opened this issue Jul 11, 2024 · 7 comments · Fixed by #803
Closed

pypowsybl crashes python kernel on import #802

awarsewa opened this issue Jul 11, 2024 · 7 comments · Fixed by #803
Assignees
Labels
bug Something isn't working

Comments

@awarsewa
Copy link

awarsewa commented Jul 11, 2024

Describe the current behavior

With a clean installation of pypowsybl v1.6.0 with C-Python 3.12 on Windows 10 (Anaconda) with up-to-date setuptools and pip according to the instruction in the Readme, I import pypowsybl:

import pypowsybl as pp

and the following happens:

Windows fatal exception: access violation

Then my kernel crashes and is restarted.

Any idea why this is happening? I tried a clean reinstall several times but I still have the same problem.
Does anyone else have the same issue?

Describe the expected behavior

Import should work as it does with the previous version. Other packages are working just fine.

Describe the steps

import pypowsybl as pp

Environment

INSTALLED VERSIONS

commit : d9cdd2ee5a58015ef6f4d15c7226110c9aab8140
python : 3.12.0.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19045
machine : AMD64
processor : Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en
LOCALE : de_DE.cp1252

pandas : 2.2.2
numpy : 2.0.0
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : 70.3.0
pip : 24.1.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 8.26.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None

Relevant Log Output

Main thread:
Current thread 0x00006a30 (most recent call first):
File "", line 488 in _call_with_frames_removed
File "", line 1288 in create_module
File "", line 813 in module_from_spec
File "", line 915 in _load_unlocked
File "", line 1325 in _find_and_load_unlocked
File "", line 1354 in _find_and_load
File "", line 488 in _call_with_frames_removed
File "", line 1409 in handle_fromlist
File "C:\Programme\Anaconda3\envs\pypowsybl\Lib\site-packages\pypowsybl_init
.py", line 12 in
File "", line 488 in _call_with_frames_removed
File "", line 994 in exec_module
File "", line 929 in _load_unlocked
File "", line 1325 in _find_and_load_unlocked
File "", line 1354 in _find_and_load
File "C:\Programme\Anaconda3\Temp\ipykernel_25208\3873728849.py", line 1 in

Extra Information

It seems to be a problem with importing _pypowsybl and paths or something like that. I don't really understand what's wrong.

@awarsewa awarsewa added the bug Something isn't working label Jul 11, 2024
@obrix
Copy link
Member

obrix commented Jul 11, 2024

Hello @awarsewa

Thanks for the bug report, we are aware of the issue and are investigating it right now.
Do you have the possibility to test an import on python 3.10 just to check if the issue is also present in this case on your system ?

Thanks.

@awarsewa
Copy link
Author

Hi @obrix ,

thanks for your reply and taking the time to investigate this issue.
I tested with python 3.10 on my system and the same problem occurs.

@obrix
Copy link
Member

obrix commented Jul 12, 2024

@awarsewa Thanks, one more thing, would you be able to update your VC++ redistributable to latest version (at the following link latest-supported-vc-redist and do one more test with 1.6.0 version please ?

We narrowed down the issue and will probably be able to publish a patched 1.6.0 version soon.

@awarsewa
Copy link
Author

@obrix I'll test that as soon as I can, but need to wait for the IT-support to update VC++ for me. I assume that I can test it on Monday

@jeandemanged jeandemanged linked a pull request Jul 12, 2024 that will close this issue
7 tasks
@obrix
Copy link
Member

obrix commented Jul 15, 2024

Hello @awarsewa,

as the issue is a bit hard to reproduce can you do a test with a python wheel produced with the final fix ?

You can find the wheel to install with the fix included for several python versions here : https://github.com/powsybl/pypowsybl/actions/runs/9935508031

Thanks in advance!

@obrix obrix self-assigned this Jul 15, 2024
@awarsewa
Copy link
Author

Hi @obrix,

thanks for the fix. I tested the wheel for Python 3.12 on Windows and importing the package works without issues for me.

@obrix
Copy link
Member

obrix commented Jul 15, 2024

@awarsewa Good thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants