BDNYC / astrodbkit

A Python module for astronomy to create, manage, and collaborate using SQL relational databases.
MIT License
2 stars 7 forks source link

error when merging 'spectra' table #44

Open kelle opened 8 years ago

kelle commented 8 years ago

Trying to merge 'spectra' table and it's failing in get_spec and/or convert spectrum and/or merge.

db.merge('/Users/kelle/Dropbox/BDNYCdev_kcApr16.db',tables=["spectra"]) Could not retrieve spectrum at /Users/kelle/Dropbox/BDNYC_spectra/nir_spectra/U20744.fits. Could not retrieve spectrum at /Users/kelle/Dropbox/BDNYC_spectra/nir_spectra/U10802.fits. .... Could not retrieve spectrum at /Users/kelle/Dropbox/BDNYC_spectra/NIRSPEC/2m1615/2m1615_65_22may14_ascii_hc. Could not retrieve spectrum at /Users/kelle/Dropbox/BDNYC_spectra/Uncategorized/cd-35b_jhk_spectra_copy.txt. Could not retrieve spectrum at /Users/kelle/Dropbox/BDNYC_spectra/SINFONI/Bonnefoy 2013 Spectral Library/ABPicb_H+K_0.025_final_spectrum.fits. Could not retrieve spectrum at /Users/kelle/Dropbox/BDNYC_spectra/SINFONI/Bonnefoy 2013 Spectral Library/ABPicb_J_0.025_norm_master_spectrum.fits. Traceback (most recent call last): File "", line 1, in File "build/bdist.macosx-10.5-x86_64/egg/astrodbkit/astrodb.py", line 609, in merge File "build/bdist.macosx-10.5-x86_64/egg/astrodbkit/astrodb.py", line 1346, in convert_spectrum File "build/bdist.macosx-10.5-x86_64/egg/astrodbkit/astrodb.py", line 1489, in __get_spec NameError: global name 'verb' is not defined

dr-rodriguez commented 8 years ago

Could not replicate to test this, but verb (short for verbose) was a variable that was not defined in several functions. It is now a parameter in the function with default value of True so this specific error should not appear now.