[Midas] Pydas Upload Error
Chapman, Brian
brchapman at ucsd.edu
Mon Jun 11 19:34:42 EDT 2012
Hello fellow Midas/Pydas users. I'm trying to use Pydas to upload a large collection of DICOM images into a Midas repository (3.2.6). I'm using Pydas to do the upload and get an error I can't seem to interpret. Here is the trace from an ipython shell:
In [14]: pydas.upload(f,leaf_folders_as_items=True)
Creating Folder from RIDERNeuroMRI-1023805636
Creating Folder from RIDERNeuroMRI-1023805636/1.3.6.1.4.1.9328.50.16.178305834899825716785073047318683688413.
Creating Folder from RIDERNeuroMRI-1023805636/1.3.6.1.4.1.9328.50.16.187830160922290415787654671880569744070.
Creating Folder from RIDERNeuroMRI-1023805636/1.3.6.1.4.1.9328.50.16.200917423723862270303439694814149987950.
Creating Folder from RIDERNeuroMRI-1023805636/1.3.6.1.4.1.9328.50.16.27118072745292100429868001128277960109.
Creating Folder from RIDERNeuroMRI-1023805636/1.3.6.1.4.1.9328.50.16.338984301554101892670865995322384362242.
Creating Folder from RIDERNeuroMRI-1023805636/1.3.6.1.4.1.9328.50.16.45348789841732529083649427972134988661.
Uploading Item from RIDERNeuroMRI-1023805636/.DS_Store
---------------------------------------------------------------------------
PydasException Traceback (most recent call last)
/Volumes/eos-data1/RIDER_Neuro_MRI/RIDER Neuro MRI/<ipython-input-14-831375746a05> in <module>()
----> 1 pydas.upload(f,leaf_folders_as_items=True)
/Library/Python/2.7/site-packages/pydas-0.2.0-py2.7.egg/pydas/__init__.pyc in upload(file_pattern, destination, leaf_folders_as_items)
203 parent_folder_id,
204 parent_folder_name,
--> 205 leaf_folders_as_items)
206
207
/Library/Python/2.7/site-packages/pydas-0.2.0-py2.7.egg/pydas/__init__.pyc in _upload_folder_recursive(local_folder, parent_folder_id, parent_folder_name, leaf_folders_as_items)
127 _upload_as_item(leaf_file,
128 current_parent_id,
--> 129 full_path)
130
131 def _has_only_files(local_folder):
/Library/Python/2.7/site-packages/pydas-0.2.0-py2.7.egg/pydas/__init__.pyc in _upload_as_item(local_file, parent_folder_id, file_path)
68 new_item = pydas.communicator.create_item(pydas.token,
69 local_file,
---> 70 parent_folder_id)
71 current_item_id = new_item['item_id']
72 up_token = pydas.communicator.generate_upload_token(pydas.token,
/Library/Python/2.7/site-packages/pydas-0.2.0-py2.7.egg/pydas/drivers.pyc in create_item(self, token, name, parentid, **kwargs)
232 if kwargs.has_key(key):
233 parameters[key] = kwargs[key]
--> 234 response = self.request('midas.item.create', parameters)
235 return response
236
/Library/Python/2.7/site-packages/pydas-0.2.0-py2.7.egg/pydas/retry.pyc in wrapper(*args, **kw)
25 return fn(*args, **kw)
26 else:
---> 27 raise pe
28 return wrapper
PydasException: u'Request failed with Midas error code 0: Unsupported segments file format'
> /Volumes/eos-data1/RIDER_Neuro_MRI/RIDER Neuro MRI/build/bdist.macosx-10.7-intel/egg/pydas/retry.py(27)wrapper()
I cannot interpret what the "Unsupported segments file format" means and I cannot see any files in the directory that seem problematic.
Brian
Brian E. Chapman, PhD
Associate Professor
Division of Biomedical Informatics
University of California, San Diego
More information about the Midas
mailing list