Skip to content
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

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

Closed
jking79 opened this issue Mar 8, 2016 · 11 comments
Closed

Comments

@jking79
Copy link

jking79 commented Mar 8, 2016

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

@gneeser
Copy link

gneeser commented Mar 14, 2016

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

Thanks,
Greg

@jking79
Copy link
Author

jking79 commented Mar 14, 2016

Greg,

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

Jack

@gneeser
Copy link

gneeser commented Mar 21, 2016

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
Copy link

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
Copy link

gneeser commented Mar 28, 2016

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
Copy link
Author

jking79 commented Mar 28, 2016

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 #158 (comment)

@jking79
Copy link
Author

jking79 commented Mar 28, 2016

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 #158 (comment)

@jking79
Copy link
Author

jking79 commented Apr 25, 2016

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
Copy link

jstupak commented Apr 25, 2016

Greg maintains an example xml file here:

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

@gneeser
Copy link

gneeser commented Apr 26, 2016

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
Copy link

gneeser commented Apr 26, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants