issues: 1115878145
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1115878145 | I_kwDOAMm_X85CgvMB | 6198 | [Bug]: Off-main-thread import fails | 266544 | closed | 0 | 1 | 2022-01-27T07:45:02Z | 2022-01-27T17:14:54Z | 2022-01-27T17:14:54Z | NONE | What happened?Initial import of xarray fails if it happens in a non-main thread. What did you expect to happen?Import succeeding on any thread Minimal Complete Verifiable Example```python import threading def import_xarray(): import xarray thread = threading.Thread(target=import_xarray) thread.start() thread.join() -> RuntimeError: There is no current event loop in thread 'Thread-1'.``` Relevant log output
Anything else we need to know?This happens with version 0.20.2 from conda-forge. It does not happen with version 0.17.0 that I run locally. This may be related to a change in xarray's dependencies rather than xarray itself. (I see dask, distributed, tornado, asyncio in the stack trace, but it's impossible for me to decide which of these are "at fault"). EnvironmentFailing environment is a fresh Docker image with xarray installed from conda-forge. A previous non-failing Docker image was built in December. I don't have this image anymore, so I can't check versions there. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/6198/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |