-
Notifications
You must be signed in to change notification settings - Fork 51
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
Lightcurve creation failure [keyError: 'fit_success'] #368
Comments
Hi @Pfesi. I had this issue with fermipy-1.0.0 and astropy-3.2.3.
to
Longer answer |
Hi @jeget , thanks for trying to help. So I tried both your solutions and I still get the same error. |
Hi! The error happens only for long periods (I'm able to perform the lightcurve for three months but I have this error when I try to extend the period to one year). The solution suggested by @jeget doesn't work. Best, |
@Pfesi are you still using fermipy 1.0.0? In your last messages you reported lines like
which means fermipy is under 1.0.0 (because of python2.7). I think, my solution may not work in that case. |
Hello, I have attempted making a lightcurve on the newest Fermipy 1.0.1 and run into the same issue (even with
I have also made the suggested change to ltcube.py from @jeget and unfortunately there is no change. |
Hi @jleagle94 I implemented @jeget's fix in fermipy v1.0.1 running fermitools v2.0.8 and everything worked great for me. I did not set the option use_local_ltcube so my analysis uses the default for this. Just a thought... did you implement the fix to ltcube.py before generating the global ltcube fits file? If not, this could be the reason you're still getting this problem with your lightcurves. |
Hi @cameronrulten, I tried first the default (see the first command output of my previous comment) and got same error as setting use_local_ltcube = False. I have been unsuccessful in generating any lightcurve so far. For the general analysis though (loading the config file, optimizing, finding best fit), I can make the ltcubes just fine. It's only the lightcurves I face this issue with right now. If the global ltcube is the ltcube_0*.fits generated initially upon set up, then yes I had made the change after the ltcube was generated. I will re-generate the ltcube from this step then and see if that works. |
Update: I have re-generated the ltcube file as suggested by @cameronrulten after making @jegets changes to ltcube.py. The same error persists when trying to generate a lightcurve using the same commands in my first post. |
Hi there, The full traceback is As you might notice, the error message here might point to something else, but I was not sure whether to open a totally new issue, or just post this here first. Please tell me, whether it's better to open a new issue. Otherwise: Any idea what might go wrong? |
Hey guys, I believe both solutions from @jeget and @agokus are required in order to address the issues in both ltcube.py and lightcurve.py for Fermipy 1.0.**. I implemented @jeget's fix to the ltcube.py in @agokus shared with me a quick fix that changes in notation somewhat for FermiPy 1.0.* than the Python 2.7 version and I share it below. The code in ** quotes should be added to lightcurve.py. (This is showing lines 448-471 after adding the quick fix):
I can confirm that I was able to successfully generate a 10-day binned lightcurve after implementing the solutions. Thanks to @jeget and @agokus |
Hi @jleagle94, I can also confirm that I also managed to get a light curve with @jeget and @agokus solutions. Thank you all for your valued inputs. |
Just a note, this solution worked for me on fermipy version v1.0.1 |
Incorporate fix for "key not found" errors using solution from fermiPy/fermipy#368
Hi folks, I am also getting the same error. I have tried to resolve it as mention above , but i couldn't . KeyError Traceback (most recent call last) ~/anaconda3/envs/fermi/lib/python3.7/site-packages/fermipy/lightcurve.py in lightcurve(self, name, **kwargs) ~/anaconda3/envs/fermi/lib/python3.7/site-packages/fermipy/lightcurve.py in _make_lc(self, name, **kwargs) KeyError: 'fit_success' Anyhelp would be much appreciated |
Hi |
Hi Muhammad,
I find that a bit odd because I run PyQt5 on my MacBook Pro. Have you tried
installing fermi on a virtual environment?
Kind regards,
Pfesi
On Wed, 12 Apr 2023 at 01:38, Muhammad Anjum ***@***.***> wrote:
Hi
I have Macbook M1 and can't install easyFermy as it depends on PyQt5 which
M1 chips don't support. Can someone explain a solution?
—
Reply to this email directly, view it on GitHub
<#368 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIMZDUQM2CAVT3W4CD32WLXAXTPDANCNFSM4SHGRMSA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
--
Kind regards,
Pfesi
(Sent from my mobile phone)
|
Hi Pfesi Best Regards! |
Hi Muhammad,
I am working on an M1 chip Macbook pro so I do not think that the chip is
the problem as I have other software
running PyQt5. However, I have tried to install easyFermi on my Mac and I
run into an error that states that
the problem is something else. I'm not sure if you see the same issue but
here's what I see on my machine:
Collecting PyQt5
Downloading PyQt5-5.15.9.tar.gz (3.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 2.3 MB/s eta
0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
*error*: *subprocess-exited-with-error*
× Preparing metadata *(*pyproject.toml*)* did not run successfully.
│ exit code: *1*
╰─> [22 lines of output]
Traceback (most recent call last):
File
"/Users/pfesesanivanzyl/anaconda3/envs/test/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py",
line 353, in <module>
main()
File
"/Users/pfesesanivanzyl/anaconda3/envs/test/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py",
line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File
"/Users/pfesesanivanzyl/anaconda3/envs/test/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py",
line 152, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory,
config_settings)
File
"/private/var/folders/8z/tsg761zs3ddgcz2hcdf5csyw0000gn/T/pip-build-env-6ahqo4xc/overlay/lib/python3.9/site-packages/sipbuild/api.py",
line 46, in build_wheel
project = AbstractProject.bootstrap('wheel',
File
"/private/var/folders/8z/tsg761zs3ddgcz2hcdf5csyw0000gn/T/pip-build-env-6ahqo4xc/overlay/lib/python3.9/site-packages/sipbuild/abstract_project.py",
line 87, in bootstrap
project.setup(pyproject, tool, tool_description)
File
"/private/var/folders/8z/tsg761zs3ddgcz2hcdf5csyw0000gn/T/pip-build-env-6ahqo4xc/overlay/lib/python3.9/site-packages/sipbuild/project.py",
line 586, in setup
self.apply_user_defaults(tool)
File "project.py", line 68, in apply_user_defaults
super().apply_user_defaults(tool)
File
"/private/var/folders/8z/tsg761zs3ddgcz2hcdf5csyw0000gn/T/pip-build-env-6ahqo4xc/overlay/lib/python3.9/site-packages/pyqtbuild/project.py",
line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File
"/private/var/folders/8z/tsg761zs3ddgcz2hcdf5csyw0000gn/T/pip-build-env-6ahqo4xc/overlay/lib/python3.9/site-packages/sipbuild/project.py",
line 237, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File
"/private/var/folders/8z/tsg761zs3ddgcz2hcdf5csyw0000gn/T/pip-build-env-6ahqo4xc/overlay/lib/python3.9/site-packages/pyqtbuild/builder.py",
line 69, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
[end of output]
*note*: This error originates from a subprocess, and is likely not a
problem with pip.
*error*: *metadata-generation-failed*
× Encountered error while generating package metadata.
╰─> See above for output.
*note*: This is an issue with the package mentioned above, not pip.
*hint*: See above for details.
*PS* You would probably get more help if you open a new thread or issue on
github for this problem.
Kind regards,
Pfesi Van Zyl
*Fundamental astronomy*
South African Radio Astronomy Observatory (SARAO)
Address: Farm 502 JQ, Broederstroom Road,
Hartebeesthoek, 1740
Tel: *+27 (0) 12 301 3237*
Website: www.hartrao.ac.za
On Wed, Apr 12, 2023 at 10:11 AM Muhammad Anjum ***@***.***>
wrote:
… Hi Muhammad, I find that a bit odd because I run PyQt5 on my MacBook Pro.
Have you tried installing fermi on a virtual environment? Kind regards,
Pfesi
On Wed, 12 Apr 2023 at 01:38, Muhammad Anjum *@*.*> wrote: Hi I have
Macbook M1 and can't install easyFermy as it depends on PyQt5 which M1
chips don't support. Can someone explain a solution? — Reply to this email
directly, view it on GitHub <#368 (comment)
<#368 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEIMZDUQM2CAVT3W4CD32WLXAXTPDANCNFSM4SHGRMSA
<https://github.com/notifications/unsubscribe-auth/AEIMZDUQM2CAVT3W4CD32WLXAXTPDANCNFSM4SHGRMSA>
. You are receiving this because you modified the open/close state.Message
ID: @.*>
-- Kind regards, Pfesi (Sent from my mobile phone)
Hi Pfesi
Thanks for your reply. I have installed fermitools in the conda fermi
environment. The problem arises because PyQt5 doesn't support Apple's Arm
processor M1. PyQt6 supports these processors but I guess easyFermi uses
PyQt5. Thus I am unable to install easyFermi on my Macbook Air M1.
Best Regards!
—
Reply to this email directly, view it on GitHub
<#368 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIMZDWVLI3IVZCW3RSATCLXAZPSBANCNFSM4SHGRMSA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Hi everyone, this is the fermipy issue area. For problems with easyFermi please go to https://www.google.com/search?q=easyfermi and get in touch with the authors. |
Yes that's the problem. EasyFermi tool is based on PyQT5 which the Macbook M1 chip models do not support. However if you find a fix, please let me know. |
Sorry the easyFermi lead me to this. I was trying to install easyFermi that is based on fermipy and PyQt5. Unfortunately the Apple's arm processors M1 only support PyQT6 or higher. Thanks for reminding me! Cheers, |
Good day
I've installed fermipy and fermitools on my server, and when i try to generate a lightcurve i get the following error
<class 'RuntimeError'>
Traceback (most recent call last):
File "", line 1, in
File "/home/dserver/anaconda2/envs/fermi/lib/python3.7/site-packages/fermipy/lightcurve.py", line 289, in lightcurve
o = self._make_lc(name, **config)
File "/home/dserver/anaconda2/envs/fermi/lib/python3.7/site-packages/fermipy/lightcurve.py", line 452, in _make_lc
if not next_fit['fit_success']:
KeyError: 'fit_success'
I'm running fermipy version 1.0.0 and ScienceTools version 2.0.0
Any help on what could be causing this will be highly appreciated.
I've attached the full analysis in the text file below.
fermipy_analysis.txt
The text was updated successfully, but these errors were encountered: