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

Can not import HAPI V.1.2.2.0 under Python 3.4 #38

Open
zhanyifan opened this issue Aug 25, 2022 · 2 comments
Open

Can not import HAPI V.1.2.2.0 under Python 3.4 #38

zhanyifan opened this issue Aug 25, 2022 · 2 comments

Comments

@zhanyifan
Copy link

Hello,
Thanks for providing the HAPI for scientific research!
I am a freshman for HAPI and Python. I am using Python 3.4.1 with Anaconda 2.1.0 (64-bit) and the numpy has been intalled. When I tried to import the newest version of HAPI[V.1.2.2.0], I got the following error message (can also be checked within the attachment ):

from hapi import * File "C:\Users\xxx\Anaconda3\lib\hapi.py", line 35549 return absorptionCoefficient_Generic(*args,**kwargs, SyntaxError: invalid syntax

20220825145957

I have tested that the HAPI [V.1.2.2.0] can be imported under Python 3.9+ while the HAPI [V.1.1.0.7] can be imported under Python 3.4. But I have to use Python 3.4 now, can you help finding out what a issue exist?

Thank you!

@jmmelko
Copy link

jmmelko commented Dec 19, 2023

I am not an historian of Python, but it looks likes 3.4 does not like "line breaks" in the code. I would suggest upgrading to 3.6 or more, or edit hapi manually to add a line continuation character ' \' at the end of each line like this one.

either that or your file got corrupted

@zhanyifan
Copy link
Author

I am not an historian of Python, but it looks likes 3.4 does not like "line breaks" in the code. I would suggest upgrading to 3.6 or more, or edit hapi manually to add a line continuation character ' ' at the end of each line like this one.

either that or your file got corrupted

Thank you very much for the comment! I will try it later. :)

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