PyHammer UnboundLocalError
JosephKarpinski opened this issue · 5 comments
JosephKarpinski commented
zephyr5050 commented
Issue should have been fixed in commit 0152715 on developer branch. Check out the lastest of that branch and let me know if this resolves your issue.
JosephKarpinski commented
Just tried the new PyHammer code.
Getting UnboundLocalError in two different location:
- line 128 when new lineOutfile is turned on
Josephs-iMac:~ josephkarpinski$ python3 new_pyhammer.py -f -i downloads/out.txt
- Processing bad_A4 (G_165-39)_FeH[-2.32]_spec-3588-55184-0392.fits
- Processing bad_A9V (154660)_FeH[-2.32]_spec-3590-55201-0318.fits
Traceback (most recent call last):
File "new_pyhammer.py", line 846, in goToMain
main(self.options)
File "new_pyhammer.py", line 128, in main
lineOutfile.write(fname + ',' + str(value[0]) + ',' + str(value[1])+',')
UnboundLocalError: local variable 'lineOutfile' referenced before assignment
Abort trap: 6
- line 193 when new lineOutfile is turned off
Josephs-iMac:~ josephkarpinski$ python3 new_pyhammer.py -f -i downloads/out.txt
- Processing bad_A4 (G_165-39)_FeH[-2.32]_spec-3588-55184-0392.fits
- Processing bad_A9V (154660)_FeH[-2.32]_spec-3590-55201-0318.fits
- Processing bad_A9V (154660)_FeH[0.25]_spec-3609-55201-0112.fits
- Processing bad_CV_FeH[0.17]_spec-5848-56029-0134.fits
- Processing bad_F5Ib... (17463)_FeH[0.17]_spec-3609-55201-0018.fits
- Processing bad_F6III (61064)_FeH[0.09]_spec-3606-55182-0454.fits
- Processing bad_F8V (G_243-63)_FeH[-0.05]_spec-3587-55182-0006.fits
- Processing bad_K1_FeH[0.05]_spec-0792-52353-0217.fits
- Processing spec-0266-51630-0015.fits
- Processing spec-0618-52049-0372.fits
- Processing spec-1079-52621-0509.fits
Traceback (most recent call last):
File "new_pyhammer.py", line 846, in goToMain
main(self.options)
File "new_pyhammer.py", line 193, in main
lineOutfile.close()
UnboundLocalError: local variable 'lineOutfile' referenced before assignment
Abort trap: 6
JosephKarpinski commented
Updated entry on PyHammer issues web site.
UnboundLocalError in two locations.
See update.
…Sent from my iPad
On Oct 11, 2018, at 10:15 PM, zephyr5050 <notifications@github.com<mailto:notifications@github.com>> wrote:
Issue should have been fixed in commit 0152715<0152715> on developer branch. Check out the lastest of that branch and let me know if this resolves your issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#29 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AjZ2IE6ahNeA9ffOVf3f4ho8t9X6TJ2aks5uj_tFgaJpZM4XUUDf>.
zephyr5050 commented
Made more updates. Check out developer branch and give it a go.
JosephKarpinski commented
Looks good!
Put it through multiple known NaN abend FITS files with no issues.
…Sent from my iPhone
On Oct 13, 2018, at 10:14 AM, zephyr5050 <notifications@github.com<mailto:notifications@github.com>> wrote:
Made more updates. Check out developer branch and give it a go.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#29 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AjZ2IN1et2aZrDT8ekt1ifaWoDDnxfXgks5ukfVcgaJpZM4XUUDf>.