question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get unexpected keyword argument 'callback_timeout' when creating GCSFileSystem object on Windows

See original GitHub issue

Hello everyone,

What happened: I am working on a Windows Server machine on Google Cloud Plateform, with Python 3.8. I am trying to create a GCSFileSystem object with asynchronous=False. No multiprocessing, no dask, just good old serial Python. I get the following exception :

>>> gcsfs.GCSFileSystem(asynchronous=False)
Exception ignored in: <function ClientSession.__del__ at 0x0000005A7B51FA60>
Traceback (most recent call last):
  File "C:\Users\advestis\PycharmProjects\venvs\transparentpath\lib\site-packages\aiohttp\client.py", line 326, in __del__
    if not self.closed:
  File "C:\Users\advestis\PycharmProjects\venvs\transparentpath\lib\site-packages\aiohttp\client.py", line 963, in closed
    return self._connector is None or self._connector.closed
AttributeError: 'ClientSession' object has no attribute '_connector'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\advestis\PycharmProjects\venvs\transparentpath\lib\site-packages\fsspec\spec.py", line 69, in __call__
    obj = super().__call__(*args, **kwargs)
  File "C:\Users\advestis\PycharmProjects\venvs\transparentpath\lib\site-packages\gcsfs\core.py", line 269, in __init__
    self._session = sync(
  File "C:\Users\advestis\PycharmProjects\venvs\transparentpath\lib\site-packages\fsspec\asyn.py", line 53, in sync
    raise result[0]
  File "C:\Users\advestis\PycharmProjects\venvs\transparentpath\lib\site-packages\fsspec\asyn.py", line 20, in _runner
    result[0] = await coro
  File "C:\Users\advestis\PycharmProjects\venvs\transparentpath\lib\site-packages\fsspec\implementations\http.py", line 25, in get_client
    return aiohttp.ClientSession(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'callback_timeout'
>>>

Minimal Complete Verifiable Example:

import gcsfs
gcsfs.GCSFileSystem(asynchronous=True)  # works fine
gcsfs.GCSFileSystem(asynchronous=False)  # TypeError: __init__() got an unexpected keyword argument 'callback_timeout'
gcsfs.GCSFileSystem()  # TypeError: __init__() got an unexpected keyword argument 'callback_timeout'

Anything else we need to know?:

It might have something to do with the following PR : #326 I can’t be sure since I did not try with an earlier version.

I do not specify any credentials.

Environment:

  • Python version: 3.8
  • gcsfs version: 0.7.2
  • Operating System: Microsoft, Windows Server, 2012 R2 Datacenter, Server with Desktop Experience, x64 built on 20201208, supports Shielded VM features
  • Install method (conda, pip, source): pip install gcsfs in a virtualenv

Thanks in advance for any advice, or better for a bug fix 😉

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
srojcommented, Apr 7, 2021

We were having the same issue a few hours ago, with gcsfs==0.7.2 and fsspec==0.8.7. Updating to gcsfs==0.8.0 and pinning fsspec to fsspec==0.9.0 fixed it for us (which is pretty much what this relevant, but not yet released PR is doing).

0reactions
pcotteadvestiscommented, Apr 8, 2021

What versions of fsspec and gcsfs do you have?

Please install fsspec 0.9.0 with gcsfs 0.8.0 OR fsspec 0.8.x with gcsfs 0.7.x.

Hi, I have gcsfs 0.7.2. I tried with gcsfs 0.8.0 and fsspec 0.9.0, it seems to be working. Thank you !

Read more comments on GitHub >

github_iconTop Results From Across the Web

call__() got an unexpected keyword argument 'metadata' error ...
This was due to a mistake in the code, instead of Retry object i was using Retry class. Thank you for pointing this...
Read more >
consume() got an unexpected keyword argument 'timeout' #220
When using blob.download_as_string, it includes a kwarg called timeout. This is raising an exception that consume() got an unexpected ...
Read more >
API — GCSFs 2022.11.0+2.g111769a documentation
Creating an object implicitly creates it's parent directories, and removing all objects from a directory implicitly deletes the empty directory. GCSFileSystem ...
Read more >
Satellite sync fails with error 'Artifact() got an unexpected ...
Certain RHEL minor version repository sync fails with the following error. Raw. Katello::Errors::Pulp3Error Artifact() got an unexpected keyword ...
Read more >
Failed to connect to Astra with Python driver, "got an ...
Following the default how to once the Database created ... __init__; TypeError: __init__() got an unexpected keyword argument 'cloud'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found