Import fails in python 3.9
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
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!")
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pyOFMesh.pyx, using the import traceback and the fieldType invalid branch described in the issue. Verify the import failure with Python 3.9, make the suggested error-handling change, and confirm that importing pyofm succeeds while invalid fieldType input reports the expected error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100