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.

Existing file marked as non-existing

See original GitHub issue

What happened:

fs.isfile(existing_file_path) incorrectly returns False and gives a warning

EDIT: Output is

False
RuntimeWarning: coroutine 'AzureBlobFileSystem._details' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

What you expected to happen:

Return True without a warning

Minimal Complete Verifiable Example:

import adlfs, fsspec, os
storage_options = {
    'account_name': os.environ['AZ_STORAGE_ACCOUNT_NAME'],
    'account_key': os.environ['AZ_STORAGE_ACCOUNT_KEY']    
}
az_storage_container_name = os.environ['AZ_STORAGE_CONTAINER_NAME']
fs = fsspec.filesystem('abfs', **storage_options)

base_path = f'abfs://{az_storage_container_name}/data/datasets'
existing_file_path = f'{base_path}/{dataset_id}'
fs.isdir(existing_file_path)

Anything else we need to know?:

Environment:

fsspec ‘2021.07.0’ (conda) adlfs ‘2021.08.1’ (pip, no conda yet) docker / ubuntu 18.04 / python 3.7

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
hayesgbcommented, Aug 18, 2021

@lmeyerov – I just refactored _isdir on the accel_isdir branch. It passes all the tests, and completely eliminates the list_blobs call. Would appreciate your feedback if you have a chance to check it out.

1reaction
hayesgbcommented, Aug 18, 2021

Thanks for the help here @lmeyerov Release 2021.08.2 should fix the errors with isfile.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bash check shows file exists for non-existent files?
In this case, you mentioned that you're dealing with a non-existent file, so $stuff is actually empty, which would be like typing:
Read more >
How to get rid of non-existing file from IDEA project?
In my project view, I have a file displayed many times (about 80-90 times). The file is marked with lock as read-only, it's...
Read more >
non-existing file opened from command line should not be ...
I typically use the code command to open files from the WSL console. ... The request is that new tabs should not be...
Read more >
Non existing file in pending changes when merging undelete ...
My assumption is that every pending change not marked delete should exist on disk, and so I'm at a loss trying to figure...
Read more >
Copying file using scp to non-existing local directory
After mkdir -p , if file is really a file and /local/non-existing/directory/ is really a directory, your scp command should work.
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