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.

AttributeError: 'HadoopFileSystem' object has no attribute 'close'

See original GitHub issue

When running the following code:

import fsspec
f = fsspec.open('hdfs:///path/to/file.csv').open()
...

I get the following error when the script exits (but complete successfully):

AttributeError: 'HadoopFileSystem' object has no attribute 'close'
Exception ignored in: 'pyarrow.lib.HadoopFileSystem.__dealloc__'
AttributeError: 'HadoopFileSystem' object has no attribute 'close'

I’m also getting the error when running:

import fsspec
f = fsspec.open('hdfs:///path/to/file.csv').open()
...
f.close()

The versions in my environment are:

python: 3.7.8
fsspec: 0.8.0
pyarrow: 1.0.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
martindurantcommented, Oct 1, 2020

Well I suppose that close can be added to the list of known attributes here; but interesting that this was not apparently needed before. Note that this is a method for the class instance, not the file, to close and free the connection, which is happening during garbage collection.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dask - distributed.utils - module 'pyarrow' has no attribute 'hdfs'
I am trying to write a dask dataframe to hdfs parquet using pyarrow engine in to_parquet api. But the write is failing with...
Read more >
pyarrow.fs.HadoopFileSystem — Apache Arrow v10.0.1
A non -existing or unreachable file returns a FileStat object and has a FileType of value NotFound. An exception indicates a truly exceptional...
Read more >
pyarrow.fs.HadoopFileSystem — Apache Arrow v3.0.0
A non -existing or unreachable file returns a FileStat object and has a FileType of value NotFound. An exception indicates a truly exceptional...
Read more >
fsspec Documentation - Read the Docs
You can use fsspec's file objects with any python function that accepts ... fsspec can be installed from PyPI or conda and has...
Read more >
The Azure Blob Filesystem driver (ABFS) - Storage
This driver performed the complex task of mapping file system semantics (as required by the Hadoop FileSystem interface) to that of the object...
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