hitranonline / hapiest

A GUI frontend which allows manipulation and processing of data from the HITRAN database.
http://hitran.org/
Other
30 stars 9 forks source link

Error Encountered #47

Closed GJpku closed 4 years ago

GJpku commented 4 years ago

I installed Hapiest on my windows 10. Every time I run, this error comes up and the program gets stuck. I need your help, and thank you very much!

Done initializing hapi db... Encountered an error: 'MoleculeMeta' object has no attribute 'id' Traceback (most recent call last): File "src/main.py", line 19, in sys.exit(run()) File "D:\HITEMP\hapiest\src\app.py", line 141, in run window = MainWindow() File "D:\HITEMP\hapiest\src\windows\main_window.py", line 8, in init Window.init(self, MainWindowWidget(self), None) File "D:\HITEMP\hapiest\src\widgets\main_window_widget.py", line 91, in init self.cross_section_fetch_widget = CrossSectionFetchWidget(self) File "D:\HITEMP\hapiest\src\widgets\cross_section_fetch_widget.py", line 72, in init self.molecule.addItems(CrossSectionMeta.all_names_sorted_by_hitran_id()) File "D:\HITEMP\hapiest\src\metadata\xsc_meta.py", line 68, in all_names_sorted_by_hitran_id return list(map(lambda m: m.name, sorted(molecules, key=lambda m: m.id))) File "D:\HITEMP\hapiest\src\metadata\xsc_meta.py", line 68, in return list(map(lambda m: m.name, sorted(molecules, key=lambda m: m.id))) AttributeError: 'MoleculeMeta' object has no attribute 'id'

jkarns275 commented 4 years ago

Hello, thanks for opening this issue. I also encountered this when i started hapiest recently. I think there may have been changes to HAPI or the HITRAN data base that caused this. I fixed the code that was causing the bug.

If you run the program from source, just run git pull in the hapiest folder and try running once again. If you were running from a binary version, the fix won't be applied until a new binary version is created. Let me know if you want me to create a new binary :)

GJpku commented 4 years ago

The new source code is used, and this problem is solved. Still, I have one more question: how to add different "broadeners" as displayed in manual Figure 5? Thanks again!

Hello, thanks for opening this issue. I also encountered this when i started hapiest recently. I think there may have been changes to HAPI or the HITRAN data base that caused this. I fixed the code that was causing the bug. If you run the program from source, just run git pull in the hapiest folder and try running once again. If you were running from a binary version, the fix won't be applied until a new binary version is created. Let me know if you want me to create a new binary :)

jkarns275 commented 4 years ago

if you want to use broadeners, you to download some extra data from hitran. The extra parameters are called "gamma_CO2", "gammaH2O", etc. where the molecule name is the broadener. Then, when you select that table in the graphing tab, the broadeners for which you downloaded "gamma" parameters will be listed and you can add them as broadeners in the proportions you wish.

I can take screenshots if you need them :)

GJpku commented 4 years ago

Thank you! This is very helpful, and I finally understand the meaning of the parameter groups on the data fetching page.

if you want to use broadeners, you to download some extra data from hitran. The extra parameters are called "gamma_CO2", "gammaH2O", etc. where the molecule name is the broadener. Then, when you select that table in the graphing tab, the broadeners for which you downloaded "gamma" parameters will be listed and you can add them as broadeners in the proportions you wish. I can take screenshots if you need them :)