-
Notifications
You must be signed in to change notification settings - Fork 9
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
from_xml (string) raises path too long for Windows #57
Comments
huh, that sounds like #50 (comment) which I tried to fix in #56 ... (and yeah, it does call os.path.exists to detect if it's a raw XML string or a file). However, I only tested locally on mac (where it works). will try to post a fix soon. thanks! |
Thanks for the quick fix here. Looking forward to the release. I also heartily approve of the addition of other platforms to the tests in github actions. |
No problem! Thanks again for letting me know. Looks like tests are passing now on all three platforms, with py3.7-3.9. I just pushed v0.2.2 and it will likely post to pypi shortly. I'm very glad to hear you're finding it useful at aics! And using it as an intermediate representation was what got me going down this line in the first place :) so will be curious to hear how that works out for you. keep me updated 👍 |
I'm using Python 3.7.5, ome-types 0.2.1, and on Windows, trying to pass my xml string in to from_xml:
File "d:\src\aics\cellbrowser-tools\cellbrowser_tools\fov_processing.py", line 295, in add_segs_to_img
self.omexml = from_xml(description)
File "C:\Users\danielt\AppData\Local\Continuum\anaconda3\envs\cellbrowser-tools\lib\site-packages\ome_types_init_.py", line 37, in from_xml
d = to_dict(xml)
File "C:\Users\danielt\AppData\Local\Continuum\anaconda3\envs\cellbrowser-tools\lib\site-packages\ome_types\schema.py", line 265, in to_dict
_xml = xml if os.path.exists(xml) else StringIO(xml)
File "C:\Users\danielt\AppData\Local\Continuum\anaconda3\envs\cellbrowser-tools\lib\genericpath.py", line 19, in exists
os.stat(path)
ValueError: stat: path too long for Windows
It seems the code is using os.path.exists on the raw xml string to see if it's a file or not?
The text was updated successfully, but these errors were encountered: