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

xlsx format is not recognize #8341

Closed
FredericBGA opened this issue Jul 16, 2019 · 4 comments
Closed

xlsx format is not recognize #8341

FredericBGA opened this issue Jul 16, 2019 · 4 comments
Assignees

Comments

@FredericBGA
Copy link
Contributor

@FredericBGA FredericBGA commented Jul 16, 2019

on galaxy 19_05 we can't upload an xlsx file and let galaxy sniff the datatype.
it works when you set the datatype yourself.

the errors on galaxy.eu and galaxy.org are different...
I have the same error as galaxy.org on my instance.

galaxy.eu

Fatal error: Exit code 1 ()
[Errno 2] No such file or directory: SafeStringWrapper(unicode:__lt__class sq__galaxy.tools.wrappers.ToolParameterValueWrapper__sq____gt,__lt__class sq__galaxy.util.object_wrapper.SafeStringWrapper__sq____gt,_lt__class sq__numbers.Number__sq

galaxy.org:

Traceback (most recent call last):
File "/cvmfs/main.galaxyproject.org/galaxy/tools/data_source/upload.py", line 326, in
main()
File "/cvmfs/main.galaxyproject.org/galaxy/tools/data_source/upload.py", line 319, in main
metadata.append(add_file(dataset, registry, output_path))
File "/cvmfs/main.galaxyproject.org/galaxy/tools/data_source/upload.py", line 128, in add_file
convert_spaces_to_tabs=dataset.space_to_tab,
File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/datatypes/upload_util.py", line 54, in handle_upload
convert_spaces_to_tabs=convert_spaces_to_tabs,
File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/datatypes/sniff.py", line 724, in handle_uploaded_dataset_file_internal
auto_decompress=auto_decompress,
File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/datatypes/sniff.py", line 663, in handle_compressed_file
sniffed_ext = run_sniffers_raw(filename, sniff_datatypes)
File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/datatypes/sniff.py", line 482, in run_sniffers_raw
file_prefix = FilePrefix(filename_or_file_prefix)
File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/datatypes/sniff.py", line 541, in init
compressed_format, f = compression_utils.get_fileobj_raw(filename, "rb")
File "/cvmfs/main.galaxyproject.org/galaxy/lib/galaxy/util/compression_utils.py", line 50, in get_fileobj_raw
with zipfile.ZipFile(filename, mode) as zh:
File "/cvmfs/main.galaxyproject.org/python/lib/python2.7/zipfile.py", line 729, in init
raise RuntimeError('ZipFile() requires mode "r", "w", or "a"')
RuntimeError: ZipFile() requires mode "r", "w", or "a"

@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Jul 20, 2019

Are you working on a fix @wm75 or should I take this on ?

Loading

@wm75
Copy link
Contributor

@wm75 wm75 commented Jul 20, 2019

@mvdbeek I have the fix for the ZipFile issue ready.
It's really trivial (just remove 'b' from the mode before passing it to ZipFile) but I thought it should be combined with some tests of the underlying decompression function and I haven't yet found the time for that.
If you have some spare time at the moment, just go ahead. Otherwise I can work on it during next week.

Loading

@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Jul 20, 2019

just drop a xlsx file into lib/galaxy/datatypes/test, this will test pretty much everything

Loading

@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Aug 20, 2019

Should be fixed by #8362

Loading

@mvdbeek mvdbeek closed this Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants