Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Tentativa de download de URL sem arquivo causa erro IsADirectoryError #602

Open
sentry-io bot opened this issue May 2, 2023 · 0 comments
Open

Tentativa de download de URL sem arquivo causa erro IsADirectoryError #602

sentry-io bot opened this issue May 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented May 2, 2023

Sentry Issue: MARIA-QUITERIA-A4

IsADirectoryError: [Errno 21] Is a directory: '/code/data/tmp/cityhallbid/2023/4/26/'
  File "web/datasets/tasks.py", line 87, in backup_file
    s3_url, s3_file_path = client.upload_file(
  File "web/datasets/services.py", line 29, in upload_file
    file_name, temp_file_path = self.create_temp_file(
  File "web/datasets/services.py", line 57, in create_temp_file
    with open(temp_file_path, "wb") as tmp_file:

Na página de licitações é possível encontrar menções a editais e outros arquivos que estão em sites que requerem logins e/ou senhas, contrariando o acesso proposto pela LAI.

Exemplos de sites:

Devemos identificar se a URL tem arquivos ou não, para evitar erro e retries.

@anapaulagomes anapaulagomes added the bug Something isn't working label May 2, 2023
@anapaulagomes anapaulagomes changed the title Download de url sem arquivo causa erro IsADirectoryError: [Errno 21] Is a directory: '/code/data/tmp/cityhallbid/2023/4/26/' Tentativa de download de URL sem arquivo causa erro IsADirectoryError May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant