puhep / pudb

Purdue CMS FPix Database
0 stars 0 forks source link

PNGs not uploading under consoladated batcch submit using xRayupload.py #158

Closed jking79 closed 8 years ago

jking79 commented 8 years ago

When I attempted to upload my data to the DB this afternoon, the text uploaded but the pngs did not.

gneeser commented 8 years ago

Has this problem persisted? If so, could I get one of the zip files you tried so I can debug?

Thanks, Greg

jking79 commented 8 years ago

Greg,

I uploaded both mi444 and mi449, both cases the images did not upload.

Jack

gneeser commented 8 years ago

Jack, Could you send one of the zip files you tried over? I have an idea as to what the problem is but I need to see what you tried to upload before I can issue a fix.

Thanks, Greg

NickHinton commented 8 years ago

Hi Jack,

Can you please send these zip files to us either by emailing them to me at hintonn@purdue.edu or through github? If you already sent them we are not seeing them.

Thanks, Nick

gneeser commented 8 years ago

Jack, It looks like the files attached are named slightly differently than the name put in the xml file tag. For example: Qplot_mh247_C0.png is in the tag, but the file is named:Qplot_XRFResult_mh247_C0.png

Changing that should allow the pictures to upload. If it doesn't, let me know and I'll debug further.

-Greg

jking79 commented 8 years ago

Greg,

Thank you for looking into this. I appreciate your time, this possibility never occurred to me when I was looking at it…. fresh eyes i guess. I will investigate this further with this information.

Jack

On Mar 28, 2016, at 10:02 AM, gneeser <notifications@github.com mailto:notifications@github.com> wrote:

Jack, It looks like the files attached are named slightly differently than the name put in the xml file tag. For example: Qplot_mh247_C0.png is in the tag, but the file is named:Qplot_XRFResult_mh247_C0.png

Changing that should allow the pictures to upload. If it doesn't, let me know and I'll debug further.

-Greg

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/puhep/pudb/issues/158#issuecomment-202429761

jking79 commented 8 years ago

Greg,

Two of the file names where incorrect, the other two where correct. I will test the script this evening, but I think there is more to this.. I will let you know

Jack

On Mar 28, 2016, at 10:02 AM, gneeser notifications@github.com wrote:

Jack, It looks like the files attached are named slightly differently than the name put in the xml file tag. For example: Qplot_mh247_C0.png is in the tag, but the file is named:Qplot_XRFResult_mh247_C0.png

Changing that should allow the pictures to upload. If it doesn't, let me know and I'll debug further.

-Greg

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/puhep/pudb/issues/158#issuecomment-202429761

jking79 commented 8 years ago

Greg, I am still having issues with my plots not uploading when I use the consolidated batch upload. Could you send me a generic script with the format that this needs to be in to upload so I can check my script against it.

jstupak commented 8 years ago

Greg maintains an example xml file here:

http://www.physics.purdue.edu/cmsfpix/Submission_p/submit/example_xml.xml

gneeser commented 8 years ago

All, I believe I have isolated the problem and am working on a fix; I'll let you know when I know more.

-Greg

gneeser commented 8 years ago

All, I've implemented a fix for the upload problem. As it turns out, there was a problem reading the xml due to whitespace in strings, i.e. " M-M-2-50 " is read differently than "M-M-2-50" and the php did not know to trim the strings. I added trim statements to remove the whitespace, so you shouldn't have any problems with picture upload.

However, I have to stress that adding spaces, newline characters, and the like does in fact change the string. Any newlines or whitespace outside of the tags is fine, but inside of the tag the php reads each character explicitly. To avoid this type of thing from happening in the future, I strongly recommend that you remove these type of characters from your scripts. I considered adding a global trim to the xmls, but that could cause problems elsewhere, such as in notes or names that do include whitespace.

Best, Greg