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

Fixed link for the .delete() method in Storage class #73

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

Padmanabhan100
Copy link

There is an issue in the Google Storage API link

@nhorvath nhorvath merged commit d414696 into nhorvath:master Nov 12, 2023
@felixtigges
Copy link

Since the new version (4.8.0), my code no longer works due to these changes. When I reset the changes, my code works again.

I get the following error message when I use version 4.8.0:

Traceback (most recent call last):
File "/Users/felixtigges/Applications/tf/tfWebsite/api/venv/lib/python3.9/site-packages/pyrebase/pyrebase.py", line 544, in raise_detailed_error
request_object.raise_for_status()
File "/Users/felixtigges/Applications/tf/tfWebsite/api/venv/lib/python3.9/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://firebasest {URL...} ern.appspot.com/o/?name=ztest_Checklists/errorlist/templates/2024/8/7/1723018253574.json
...
File "/Users/felixtigges/Applications/tf/tfWebsite/api/venv/lib/python3.9/site-packages/pyrebase/pyrebase.py", line 504, in delete
raise_detailed_error(request_object)
File "/Users/felixtigges/Applications/tf/tfWebsite/api/venv/lib/python3.9/site-packages/pyrebase/pyrebase.py", line 548, in raise_detailed_error
raise HTTPError(e, request_object.text)
requests.exceptions.HTTPError: [Errno 400 Client Error: Bad Request for url: https://firebasest {URL...} ern.appspot.com/o/?name=ztest_Checklists/errorlist/templates/2024/8/7/1723018253574.json] {
"error": {
"code": 400,
"message": "Invalid HTTP method/URL pair."
}
}

If I manually remove the change, the code will work again and my files can be deleted.

@nhorvath
Copy link
Owner

nhorvath commented Aug 7, 2024 via email

@felixtigges
Copy link

storage_path = "ztest_Checklist/2024/08/07/2131980.json"
storage.delete(storage_path, "")

@nhorvath
Copy link
Owner

nhorvath commented Aug 7, 2024

I think you're correct, but Google no longer publishes the url api docs so I can't be sure. I'm going to revert this pr.

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

Successfully merging this pull request may close these issues.

3 participants