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

Not able to get the ADLS File System Object - Throws exception #301

Open
Gaurang033 opened this issue Oct 3, 2019 · 4 comments
Open

Not able to get the ADLS File System Object - Throws exception #301

Gaurang033 opened this issue Oct 3, 2019 · 4 comments

Comments

@Gaurang033
Copy link

Gaurang033 commented Oct 3, 2019

Description

When I try to create the core.AzureDLFileSystem Object I am getting following exception.

File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/azure/datalake/store/core.py", line 72, in __init__
    self.connect()
  File "/usr/local/lib/python3.7/site-packages/azure/datalake/store/core.py", line 90, in connect
    self.azure = DatalakeRESTInterface(token=self.token, req_timeout_s=self.per_call_timeout_seconds, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/azure/datalake/store/lib.py", line 273, in __init__
    self._check_token()  # Retryable method. Will ensure that signed_session token is current when we set it on next line
  File "/usr/local/lib/python3.7/site-packages/azure/datalake/store/lib.py", line 307, in _check_token
    check_token_internal()
  File "/usr/local/lib/python3.7/site-packages/azure/datalake/store/retry.py", line 93, in f_retry
    out = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/azure/datalake/store/lib.py", line 303, in check_token_internal
    cur_session = self.token.signed_session()
AttributeError: 'str' object has no attribute 'signed_session'

Reproduction Steps

tannent_id, username and password has changed.

from azure.datalake.store import lib,core
tenant_id="12b02d9b-d7f2-204e-b345-0dbdcf0330f8"
token = lib.auth(tenant_id, "[email protected]", "MyPassword")
adl = core.AzureDLFileSystem('myadlsfilesystem', token)

Environment summary

SDK Version: What version of the SDK are you using? (pip show azure-datalake-store)
Answer here:
Name: azure-datalake-store
Version: 0.0.47
Summary: Azure Data Lake Store Filesystem Client Library for Python
Home-page: https://github.com/Azure/azure-data-lake-store-python
Author: Microsoft Corporation
Author-email: [email protected]
License: MIT License
Location: /usr/local/lib/python3.7/site-packages
Requires: adal, cffi, requests
Required-by:

Python Version: What Python version are you using? Is it 64-bit or 32-bit?
Answer here:
64 bit Python 3.7.4 for mac

Python 3.7.4 (default, Jul 9 2019, 18:13:23)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin

OS Version: What OS and version are you using?
Answer here: Mac 10.14.6

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: Bash

@jbulow
Copy link

jbulow commented Sep 20, 2020

This is still an issue. Why was it closed?

@akharit akharit reopened this Sep 20, 2020
@icyblade
Copy link

icyblade commented Nov 2, 2020

For some reason the 1st parameter of AzureDLFileSystem is token rather than store_name, so myadlsfilesystem is passed as token rather than the real token variable token.
adl = core.AzureDLFileSystem(store_name'myadlsfilesystem', token=token) will fix this issue.

@akshat-harit
Copy link

@jbulow Can you provide how to reproduce this?

@oleksandr-yatsuk
Copy link

adl = core.AzureDLFileSystem(store_name='myadlsfilesystem', token=token)

store_name parameter is not mentioned in the README and is super hidden in the code.

Could you, please, fix the documentation?

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

6 participants