Skip to content

hs.createReferencedFile() throws out an error occasionally #91

Open
@zhiyuli

Description

The same code works fine most of the time, but it throws out this error occasionally:
Not sure it is a hs_restclient issue or REST endpoint issue on hydroshare side:

hs.createReferencedFile(pid=resource_id, path='data/contents', name='landing_page.url', ref_url="https://www.byu.edu/")

Traceback (most recent call last):
File "C:/Users/Drew/PycharmProjects/czo/bulk-resource-creator/hs_json.py", line 128, in
hs.createReferencedFile(pid=resource_id, path='data/contents', name='landing_page.url', ref_url="https://www.byu.edu/")
File "C:\Users\Drew\Miniconda3\envs\py27\lib\site-packages\hs_restclient_init_.py", line 1111, in createReferencedFile
raise HydroShareHTTPException((url, 'POST', r.status_code))
File "C:\Users\Drew\Miniconda3\envs\py27\lib\site-packages\hs_restclient\exceptions.py", line 66, in init
self.status_msg = args[3]
IndexError: tuple index out of range

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      hs.createReferencedFile() throws out an error occasionally · Issue #91 · hydroshare/hs_restclient