Since I'm adding files to data libraries anyway, I found I could get the dataID when I uploaded the file e.g.
s = gi.libraries.upload_from_galaxy_filesystem(LibID, os.path.join(folderLoc, fname), folder_id = subfolderID, file_type="fastq", dbkey="?", link_data_only = "link_to_files") dataID = (s[0])['id']
However, If I try to use this ID as the dataID to upload a dataset to a history:
gi.histories.upload_dataset_from_library(historyID, (s[0])['id'])
I get the error :
File
"/remote/home/galaxy-test2/.venv/lib/python2.7/site-packages/bioblend/galaxy/histories/__init__.py", line 342, in upload_dataset_from_library
return Client._post(self, payload, id=history_id, contents=True)
File
"/remote/home/galaxy-test2/.venv/lib/python2.7/site-packages/bioblend/galaxy/client.py", line 169, in _post
contents=contents)
File
"/remote/home/galaxy-test2/.venv/lib/python2.7/site-packages/bioblend/galaxyclient.py", line 64, in _make_url
c_url = '/'.join([c_url, module_id])
TypeError: sequence item 1: expected string, dict found
Any help would be greatly appreciated!!