Stream: python

Topic: upgrading "sample data" from pyDataverse 0.2.1 to 0.3.2


view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 16:37):

I'm trying to jump ahead several releases and getting this error.

    print(api.status)
          ^^^^^^^^^^
AttributeError: 'Api' object has no attribute 'status'

Any ideas?

For context, here my draft pull request: https://github.com/IQSS/dataverse-sample-data/pull/44

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 16:38):

Here's the line it's failing on: https://github.com/IQSS/dataverse-sample-data/blob/cc6eb12f3a51e93546c5164ddc4ae851e56c3dac/create_sample_data.py#L17

view this post on Zulip Jan Range (May 10 2024 at 16:45):

Hm it seems like the status attribute has been remove a couple releases ago. At least I cant locate it in 0.3.1 so far.

https://github.com/gdcc/pyDataverse/blob/574739984d42d633a584c492d43b8b72c1e8425d/src/pyDataverse/api.py#L36

view this post on Zulip Jan Range (May 10 2024 at 16:46):

Do you know what the purpose of this one was?

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 17:48):

No. I'm way behind. Sounds like it happened way before 0.3.2. Thanks!

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 19:39):

This was on 0.2.1

try:
                resp = get(url)
                if resp:
                    self.status = resp.json()['status']

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 19:42):

I got "create dataverse" working: https://github.com/IQSS/dataverse-sample-data/pull/44/commits/ad23316e20de1dd6d8d585c7a1b9dae12ee466d3

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 19:43):

To get this status

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 19:43):

pydv 2.1 wold call https://demo.dataverse.org/api/info/server

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 19:44):

{"status":"OK","data":{"message":"demo.dataverse.org"}}

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 19:44):

and return the status

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 19:47):

Gotcha. I replaced it with print(api.get_info_version())

view this post on Zulip Jan Range (May 10 2024 at 20:07):

Should we add status back to the Api class? I feel its a good gateway to check the connection.

view this post on Zulip Jan Range (May 10 2024 at 20:07):

If set upon initialisation it would be an indicator for connection problems

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:14):

Meh, not sure.

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:15):

Ok, I just marked https://github.com/IQSS/dataverse-sample-data/pull/44 as ready for review. Both my create and destroy scripts work and that's all I really use.

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:15):

@Juan Pablo Tosca Villanueva maybe you can take a look. I don't know if you use any other scripts.

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:16):

I switched to pyDataverse's get_dataset_lock, which is nice. Previously I was using requests for that.

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:22):

The script I added works fine, it doesn't use pyDV directly. I tested making a dataset with 20 images and worked fine :smile:

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:22):

oh

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:22):

Wait

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:23):

Traceback (most recent call last):
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions
    yield
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 233, in handle_request
    resp = self._pool.handle_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 216, in handle_request
    raise exc from None
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 196, in handle_request
    response = connection.handle_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
    return self._connection.handle_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 143, in handle_request
    raise exc
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 113, in handle_request
    ) = self._receive_response_headers(**kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 186, in _receive_response_headers
    event = self._receive_event(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 224, in _receive_event
    data = self._network_stream.read(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_backends/sync.py", line 124, in read
    with map_exceptions(exc_map):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ReadTimeout: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/create_sample_data.py", line 77, in <module>
    resp = api.upload_datafile(dataset_pid, df_filename, df.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/pyDataverse/api.py", line 1816, in upload_datafile
    return self.post_request(
           ^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/pyDataverse/api.py", line 174, in post_request
    return self._sync_request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/pyDataverse/api.py", line 295, in _sync_request
    resp = method(**kwargs, follow_redirects=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_api.py", line 319, in post
    return request(
           ^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_api.py", line 106, in request
    return client.request(
           ^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 827, in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 914, in send
    response = self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 942, in _send_handling_auth
    response = self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
    response = self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 1015, in _send_single_request
    response = transport.handle_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 232, in handle_request
    with map_httpcore_exceptions():
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadTimeout: timed out

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:26):

So I was able to generate my custom dataset as I said but when I ran python create_sample_data.py the script crashed before it could finish

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:29):

Does it work with this?

sample_data = [
'data/dataverses/open-source-at-harvard/open-source-at-harvard.json',
'data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/open-source-at-harvard.json',
]

And what data lines are you using?

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:30):

:thinking:

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:31):

I normally just run python create_sample_data.py with no parameters or anything, is this something I have to add somewhere?

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:32):

I am going to run a quick test without the generated files

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:32):

Sorry, I'm talking about the lines in dvconfig.py, the config file.

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:32):

I only tested those two lines.

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:33):

Oh, I am testing the full thing :rolling_on_the_floor_laughing:

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:33):

sample_data = [
'data/dataverses/pums/pums.json',
'data/dataverses/pums/datasets/2000pums5/2000pums5.json',
'data/dataverses/dataverseno/dataverseno.json',
'data/dataverses/open-source-at-harvard/open-source-at-harvard.json',
'data/dataverses/open-source-at-harvard/dataverses/dataverse-project/dataverse-project.json',
'data/dataverses/open-source-at-harvard/dataverses/dataverse-project/datasets/dataverse-irc-metrics/dataverse-irc-metrics.json',
'data/dataverses/ecastro/ecastro.json',
'data/dataverses/ecastro/datasets/this-is-my-test-dataset/this-is-my-test-dataset.json',
'data/dataverses/manchester/manchester.json',
'data/dataverses/manchester/datasets/test-dataset/test-dataset.json',
'data/dataverses/dataverse-performance-demo/dataverse-performance-demo.json',
'data/dataverses/dataverse-performance-demo/datasets/performance-test/performance-test.json',
'data/dataverses/HCPDS/HCPDS.json',
'data/dataverses/HCPDS/datasets/reproductive-health-laws-around-the-world/reproductive-health-laws-around-the-world.json',
'data/dataverses/cms/cms.json',
'data/dataverses/cms/datasets/cmssampledata/cmssampledata.json',
'data/dataverses/scholcommlab/scholcommlab.json',
'data/dataverses/scholcommlab/datasets/diabeticconnect/diabeticconnect.json',
'data/dataverses/ubiquity-press/ubiquity-press.json',
'data/dataverses/ubiquity-press/dataverses/jopd/jopd.json',
'data/dataverses/ubiquity-press/dataverses/jopd/datasets/flynn-effect-in-estonia/flynn-effect-in-estonia.json',
'data/dataverses/ubiquity-press/dataverses/jopd/datasets/bafacalo/bafacalo.json',
'data/dataverses/open-source-at-harvard/datasets/open-source-at-harvard/open-source-at-harvard.json',
'data/dataverses/king/king.json',
'data/dataverses/king/datasets/cause-of-death/cause-of-death.json',
]

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:33):

Gotcha. Which one is it failing on?

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:35):

I just tested again without my custom files and got the same exception

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:35):

I don't think we put on the output where is failing

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:36):

Lock found for dataset id doi:10.5072/FK2/ZTEH0N... sleeping...
<Response [200]>
<Response [200 OK]>
<Response [200]>
<Response [200 OK]>
<Response [200]>
<Response [200 OK]>
<Response [200]>
<Response [200 OK]>
<Response [200]>
<Response [200 OK]>
<Response [200]>
<Response [200 OK]>
<Response [200]>
<Response [200 OK]>
<Response [200]>
<Response [200 OK]>
<Response [200]>
<Response [200 OK]>
<Response [200]>
Traceback (most recent call last):
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions
    yield
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 233, in handle_request
    resp = self._pool.handle_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 216, in handle_request
    raise exc from None
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 196, in handle_request
    response = connection.handle_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
    return self._connection.handle_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 143, in handle_request
    raise exc
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 113, in handle_request
    ) = self._receive_response_headers(**kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 186, in _receive_response_headers
    event = self._receive_event(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 224, in _receive_event
    data = self._network_stream.read(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_backends/sync.py", line 124, in read
    with map_exceptions(exc_map):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ReadTimeout: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/create_sample_data.py", line 77, in <module>
    resp = api.upload_datafile(dataset_pid, df_filename, df.json())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/pyDataverse/api.py", line 1816, in upload_datafile
    return self.post_request(
           ^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/pyDataverse/api.py", line 174, in post_request
    return self._sync_request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/pyDataverse/api.py", line 295, in _sync_request
    resp = method(**kwargs, follow_redirects=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_api.py", line 319, in post
    return request(
           ^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_api.py", line 106, in request
    return client.request(
           ^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 827, in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 914, in send
    response = self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 942, in _send_handling_auth
    response = self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
    response = self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_client.py", line 1015, in _send_single_request
    response = transport.handle_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 232, in handle_request
    with map_httpcore_exceptions():
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/Users/jptosca/REP/IQSS/dataverse-sample-data/venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadTimeout: timed out

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:36):

It looks like "manchester" is failing consistently.

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:37):

I think everything that has files is failing randomly because the time out

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:37):

:thinking:

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:37):

Last time failed earlier for me

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:38):

Oh. Hmm.

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:38):

Well, it could be unrelated to the pyDataverse upgrade. I rarely add all the data.

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:39):

httpcore.ReadTimeout: timed out

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:39):

When it's not late on a Friday night we can ask Jan what he thinks of that error. :grinning:

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:40):

:thumbs_up:

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:41):

"The default behavior is to raise a TimeoutException after 5 seconds of network inactivity." -- https://www.python-httpx.org/advanced/timeouts/

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:42):

Probably caused by the sleep waiting for the dataset lockout? :flushed:

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:42):

Maybe. I was thinking more that Dataverse is busy with processing data files and slow to respond.

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:43):

This happened to me locally on a fresh installation

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 20:44):

I think after one of the recent updates I started to see more sleeps and waiting for lock messages on the console

view this post on Zulip Philip Durbin ๐Ÿš€ (May 10 2024 at 20:44):

This is the line that is slow to respond:

resp = api.upload_datafile(dataset_pid, df_filename, df.json())

view this post on Zulip Jan Range (May 10 2024 at 21:13):

Maybe not related pyDataverse, but when uploading bulk data I have encountered similar issues. Have you tried uploading the file that fails individually?

view this post on Zulip Jan Range (May 10 2024 at 21:17):

In the python-dvuploader I compile all the data into a zip and upload that one, which has solved this issue for me.

view this post on Zulip Jan Range (May 10 2024 at 21:19):

Alternatively we may have to set the timeout in the request to None to never time out. Let me create a branch, so you can test it.

view this post on Zulip Jan Range (May 10 2024 at 21:23):

Just pushed it. Can you re-install using the following?

python -m pip install git+https://github.com/gdcc/pyDataverse.git@unlimited-timeout

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 21:31):

I can test later tonight :rolling_on_the_floor_laughing: my
Wife picked me up so we are at the gym now

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 22:53):

I am testing, seems to be fixed. Will post back as soon as it is done

view this post on Zulip Juan Pablo Tosca Villanueva (May 10 2024 at 22:54):

raise mapped_exc(message) from exc
httpx.ReadTimeout: timed out

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 14:32):

I'm confused. https://github.com/gdcc/pyDataverse/tree/unlimited-timeout is 7 commits behind master and no commits ahead.

view this post on Zulip Jan Range (May 15 2024 at 18:07):

Damn, I have committed it, but not pushed yet :cold_sweat:

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:08):

@Juan Pablo Tosca Villanueva told ya

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:08):

I do that all the time :crazy:

view this post on Zulip Juan Pablo Tosca Villanueva (May 15 2024 at 18:10):

:upside_down:

view this post on Zulip Jan Range (May 15 2024 at 18:12):

Sorry :grimacing:

view this post on Zulip Jan Range (May 15 2024 at 18:13):

Luckily you've spotted it!

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:20):

Ok, now we have the commit: https://github.com/gdcc/pyDataverse/commit/a524c1c91732a159f580750a7af30dab5eed04a0

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:22):

Did python -m pip install git+https://github.com/gdcc/pyDataverse.git@unlimited-timeout work?

When I do pip freeze | grep pyDataverse I still see pyDataverse==0.3.2. :thinking:

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:23):

The commit looks right, same as above: Resolved https://github.com/gdcc/pyDataverse.git to commit a524c1c91732a159f580750a7af30dab5eed04a0

view this post on Zulip Jan Range (May 15 2024 at 18:31):

The version has not yet been bumped to 0.3.3

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:34):

Right, but I don't see the change in venv/lib/python3.12/site-packages/pyDataverse/api.py

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:35):

I can delete my old venv if that helps.

view this post on Zulip Jan Range (May 15 2024 at 18:38):

What I typically do is to pull the branch and install the repository using

python -m pip install -e .

In this way, your installation will always be synced to what you have pulled from GitHub. I am not sure though if it works with venv.

view this post on Zulip Jan Range (May 15 2024 at 18:39):

Would switching to conda be an option? This allows you to use your envs globally

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:44):

Buh. Let me try blowing away my venv. That's easier for me. :sweat_smile:

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:46):

Ok, pip freeze now shows me this: pyDataverse @ git+https://github.com/gdcc/pyDataverse.git@a524c1c91732a159f580750a7af30dab5eed04a0. Good.

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 18:56):

It is chugging along!

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 19:06):

Yeah, I didn't create the full load of datasets, but I'd say it's fixed.

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 19:06):

Should I create an issue?

view this post on Zulip Jan Range (May 15 2024 at 20:47):

Great to hear! Yea, feel free to create one. I will link a PR to it :smile:

view this post on Zulip Philip Durbin ๐Ÿš€ (May 15 2024 at 21:27):

Done! https://github.com/gdcc/pyDataverse/issues/187

view this post on Zulip Jan Range (May 16 2024 at 12:33):

Created a draft PR - https://github.com/gdcc/pyDataverse/pull/188

view this post on Zulip Jan Range (May 17 2024 at 10:15):

Added test to upload 50 files and it works with the fix. Just merged it :smile:

view this post on Zulip Philip Durbin ๐Ÿš€ (May 17 2024 at 11:10):

Did it fail without the fix? On 50 files?


Last updated: Nov 01 2025 at 14:11 UTC