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

How to know if the file exists or not in the storage? #421

Open
CoutinhoElias opened this issue Jun 7, 2022 · 0 comments
Open

How to know if the file exists or not in the storage? #421

CoutinhoElias opened this issue Jun 7, 2022 · 0 comments

Comments

@CoutinhoElias
Copy link

I'm building my url but what I get is a Json object testing in the browser.

{
"error": {
"code": 404,
"message": "Not Found."
}
}

In the traceback I have the following return:

--- Logging error ---
Traceback (most recent call last):
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/loader.py", line 345, in _load_urllib
fd = opener.open(request)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/logging/init.py", line 1083, in emit
msg = self.format(record)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/logging/init.py", line 927, in format
return fmt.format(record)
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/logger.py", line 291, in format
record = copy.deepcopy(record)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 210, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 210, in
y = [deepcopy(a, memo) for a in x]
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 264, in _reconstruct
y = func(*args)
TypeError: init() missing 5 required positional arguments: 'url', 'code', 'msg', 'hdrs', and 'fp'
Call stack:
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/threading.py", line 930, in _bootstrap
self._bootstrap_inner()
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/loader.py", line 533, in run
func(*args, **kargs)
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/loader.py", line 290, in _load
data = self._load_urllib(filename, kwargs['kwargs'])
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/loader.py", line 382, in _load_urllib
Logger.exception('Loader: Failed to load image <%s>' % filename)
Message: 'Loader: Failed to load image https://firebasestorage.googleapis.com/v0/b/inventarioshop-8318f.appspot.com/o/im_bd%2F01001BA476.png?alt=media&token=5ZcdRS5cXIFtvv2BbULpQMKl6sV8QZbnSDUdQzJl'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/loader.py", line 345, in _load_urllib
fd = opener.open(request)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/logging/init.py", line 1083, in emit
msg = self.format(record)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/logging/init.py", line 927, in format
return fmt.format(record)
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/logger.py", line 291, in format
record = copy.deepcopy(record)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 210, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 210, in
y = [deepcopy(a, memo) for a in x]
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/copy.py", line 264, in _reconstruct
y = func(*args)
TypeError: init() missing 5 required positional arguments: 'url', 'code', 'msg', 'hdrs', and 'fp'
Call stack:
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/threading.py", line 930, in _bootstrap
self._bootstrap_inner()
File "/home/elias/.pyenv/versions/3.9.6/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/loader.py", line 533, in run
func(*args, **kargs)
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/loader.py", line 290, in _load
data = self._load_urllib(filename, kwargs['kwargs'])
File "/home/elias/Documentos/PROGRAMACAO/kivy_venv/lib/python3.9/site-packages/kivy/loader.py", line 382, in _load_urllib
Logger.exception('Loader: Failed to load image <%s>' % filename)
Message: 'Loader: Failed to load image https://firebasestorage.googleapis.com/v0/b/inventarioshop-8318f.appspot.com/o/im_bd%2F0100251633.png?alt=media&token=5ZcdRS5cXIFtvv2BbULpQMKl6sV8QZbnSDUdQzJl'
Arguments: ()

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

1 participant