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

Import fails in python 3.9 #13

Open
gadieid opened this issue Jun 27, 2024 · 1 comment
Open

Import fails in python 3.9 #13

gadieid opened this issue Jun 27, 2024 · 1 comment

Comments

@gadieid
Copy link

gadieid commented Jun 27, 2024

Description

Error on import in Python3.9

Steps to reproduce issue

----> 1 import pyofm

/raid/software/python/pyenv/jammy/env/lib/python3.9/site-packages/pyofm/init.py in
1 version = '1.2.2'
2
----> 3 from .pyOFM import PYOFM

/raid/software/python/pyenv/jammy/env/lib/python3.9/site-packages/pyofm/pyOFM.py in
15 from mpi4py import MPI
16 import gzip
---> 17 from .pyOFMesh import pyOFMesh
18
19

pyOFMesh.pyx in init pyOFMesh()

NameError: name 'exit' is not defined

Current behavior

Import failed

suggested Fix

Change
print("fieldType invalid!")
exit(1)
To
raise ValueError("fieldType invalid!")

@friedenhe
Copy link
Collaborator

friedenhe commented Jul 1, 2024

This is strange because we tested it with Python 3.9 and it worked without a problem. So we could not reproduce the issue. Which OS are you using? Are you using Anaconda/Miniconda Python, which version?

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