Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'S3File' object has no attribute 'forced' #925

Open
digital-idiot opened this issue Dec 30, 2024 · 1 comment
Open

'S3File' object has no attribute 'forced' #925

digital-idiot opened this issue Dec 30, 2024 · 1 comment

Comments

@digital-idiot
Copy link

digital-idiot commented Dec 30, 2024

Getting the following error when trying to create and write to a file:

Related Original Issue: Toblerity/Fiona#1476 (comment)

Exception ignored in: <function AbstractBufferedFile.__del__ at 0x10788b560>
Traceback (most recent call last):
  File "~/.micromamba/envs/PyDev/lib/python3.12/site-packages/fsspec/spec.py", line 2216, in __del__
    self.close()
  File "~/.micromamba/envs/PyDev/lib/python3.12/site-packages/fsspec/spec.py", line 2177, in close
    if not self.forced:
           ^^^^^^^^^^^
AttributeError: 'S3File' object has no attribute 'forced'

fsspec.__version__
Out: '2024.12.0'

s3fs.__version__
Out: '2024.12.0'

EDIT

Turns out fiona is using 'wb+' file mode which does not seem to be supported by 'S3File' object.

@martindurant
Copy link
Member

Turns out fiona is using 'wb+' file mode which does not seem to be supported by 'S3File' object.

Would you be willing to provide a PR to raise an appropriate exception for this case? Seeking and writing inplace for remote files is not generally possible, uploads are always essentially streamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants