-
Notifications
You must be signed in to change notification settings - Fork 47
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
AWS doesn’t support absolute paths #205
Comments
Just an update that we're running into this problem in snex2 as well. Files are being correctly uploaded to S3, but then the (Pdb) print(data_product.data.path)
*** NotImplementedError: This backend doesn't support absolute paths.
(Pdb) print(data_product.data.name)
test/none/phot_example.csv
(Pdb) from django.core.files.storage import default_storage
(Pdb) f = default_storage.open(data_product.data.name, 'r')
(Pdb) f.read()
'time,filter,magnitude,error\n55959.06999999983,r,15.582,0.005\n55959.06999999983,V,15.676,0.007\n55959.06999999983,B,15.591,0.008\n' We have not fully implemented this solution into snex2 yet, but the current plan is to write a custom processor using this. |
I think the appropriate fix is to add some sort of abstracted method for reading data products that will handle multiple use-cases. I believe Lindy is on this, but I'll be helping as well. We'll get this figured out. |
@phycodurus @jchate6 We should review this functionality to verify where our functionality stands. |
|
Describe the bug
I cannot upload reduced data products (tags "photometry" or "spectroscopy") when using AWS. When I try, I see the message "There was a problem processing your file" on site. I added a logger to
tom_dataproducts.views.DataProductUploadView.form_valid
to find that the exception raised is "This backend doesn't support absolute paths." Stack Overflow suggests I can fix this by replacingfits.getdata(data_product.data.path)
withfits.getdata(data_product.data.name)
in the methods oftom_dataproducts.data_processor.DataProcessor
, but I can't get this to work either.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The data file should be uploaded and processed. A spectrum should appear in the "Spectra" tab of that target.
Desktop (please complete the following information):
Additional context
When I upload a raw data product (e.g., tag "Fits File") it goes in a directory
TargetName/none/filename.fits
at the top level of my AWS bucket.The text was updated successfully, but these errors were encountered: