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

Can't close the client using both context manager and close() function #15358

Closed
phamhoangtuan opened this issue Nov 17, 2020 · 3 comments · Fixed by #16414
Closed

Can't close the client using both context manager and close() function #15358

phamhoangtuan opened this issue Nov 17, 2020 · 3 comments · Fixed by #16414
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@phamhoangtuan
Copy link

  • Package Name: azure.storage.filedatalake
  • Package Version: 12.2.0
  • Operating System: Linux-4.15.0-1096-azure-x86_64-with-debian-9.5
  • Python Version: Python 3.6.12

Describe the bug
Using DataLakeServiceClient class to connect to Azure Data Lake service from python client. After that, I want to close the connection socket by calling close() function or using context manager. After that I have the AttributeError: 'DataLakeServiceClient' object has no attribute '_client'

To Reproduce
Steps to reproduce the behavior:

  1. account_name = 'test_account'
    2: sas_key = 'test_key'
    3a. service_client = DataLakeServiceClient(
    account_url='https://{}.dfs.core.windows.net'.format(account_name),
    credential=sas_key
    )
    4a. service_client.close()

3b. with DataLakeServiceClient(
account_url='https://{}.dfs.core.windows.net'.format(account_name),
credential=sas_key
) as service_client:
4b. print(service_client)

Expected behavior
the service client closed successfully

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 17, 2020
@lmazuel lmazuel added Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Nov 17, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 17, 2020
@ghost
Copy link

ghost commented Nov 17, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

Issue Details
Description:
  • Package Name: azure.storage.filedatalake
  • Package Version: 12.2.0
  • Operating System: Linux-4.15.0-1096-azure-x86_64-with-debian-9.5
  • Python Version: Python 3.6.12

Describe the bug
Using DataLakeServiceClient class to connect to Azure Data Lake service from python client. After that, I want to close the connection socket by calling close() function or using context manager. After that I have the AttributeError: 'DataLakeServiceClient' object has no attribute '_client'

To Reproduce
Steps to reproduce the behavior:

  1. account_name = 'test_account'
    2: sas_key = 'test_key'
    3a. service_client = DataLakeServiceClient(
    account_url='https://{}.dfs.core.windows.net'.format(account_name),
    credential=sas_key
    )
    4a. service_client.close()

3b. with DataLakeServiceClient(
account_url='https://{}.dfs.core.windows.net'.format(account_name),
credential=sas_key
) as service_client:
4b. print(service_client)

Expected behavior
the service client closed successfully

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Author: phamhoangtuan
Assignees: xiafu-msft
Labels:

Service Attention, Storage, customer-reported, needs-triage, question

Milestone: -

@lmazuel lmazuel added the Client This issue points to a problem in the data-plane of the library. label Nov 17, 2020
@xiafu-msft xiafu-msft added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 19, 2020
@xiafu-msft
Copy link
Contributor

xiafu-msft commented Nov 19, 2020

Hi @phamhoangtuan

Thanks for reporting this bug! we will fix it later!

@tasherif-msft tasherif-msft self-assigned this Nov 19, 2020
@xiafu-msft xiafu-msft removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Jan 15, 2021
@tasherif-msft
Copy link
Contributor

Hi @phamhoangtuan! a PR with the fix to this issue has been submitted here #16414 :)
Sorry for the delay on this.

Thank you

drahnreb added a commit to drahnreb/zuschauer that referenced this issue Feb 2, 2021
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this issue Nov 9, 2022
Adding resourceconnector - Appliance GA API version (Azure#20681)

* Adding resourceconnector - appliance GA API verson

* Update swagger PR to add ArtifactURL and Another SSHKey type - ScopesAccessKey

* Commiting previous API Version 2022-04-15-preview

* Commiting latest API Version 2022-10-27

* Update to v3 types:

* Adding words to custom-words.txt

* run prettier check

* Use v3 for appliance resource type too

* resolve merge conflicts in custom words.txt

* add in readmes

* Add blockchain to latest profile

* Add additional types

* track2 modify eventhub readme.go.md (Azure#15338)

* track2 modify operationalinsights readme.go.md (Azure#15354)

* track2 modify security readme.go.md (Azure#15357)

* track2 modify eventgrid readme.go.md (Azure#15358)

* [Hub Generated] Public private branch 'dev-azure-kusto-Microsoft.Kusto-2021-08-27' (Azure#15905)

* Adds base for updating Microsoft.Kusto from version stable/2021-01-01 to version 2021-08-27

* Updates readme

* Updates API version in new specs and examples

* Swagger changes

* it1

* hh

* it2

* it3

* it5

* it6

* it7

* readme

* it10

* it11

* it11

* it 12

* it 13

* prettier

* python

* allowedIpRangeList - remove default

* bassel changes

* checkNameAvailability

* fix lint

* checkName

* fix

* managedPrivate check name

* prettier

* Update readme.python.md

* add attached enum

* Dor comments

* fix description

* readOnly

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>

* update the format to int64 for creationtimestamp and expirationtimestamp

* Updating Delete example to include location header for 202 response

* fix header in delete example

Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
Co-authored-by: JiahuiPeng <46921893+804873052@users.noreply.github.com>
Co-authored-by: hila levi <88654259+hilalevi170@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: Aditi Malladi <amalladi@Aditis-MacBook-Pro.local>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
4 participants