Skip to content

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

Open
@Gaurang033

Description

@Gaurang033

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions