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

[infra] AttributeError: np.unicode_ was removed in the NumPy 2.0 release. Use np.str_ instead. #1728

Open
aspeddro opened this issue Jul 24, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@aspeddro
Copy link
Contributor

aspeddro commented Jul 24, 2024

Descrição
Erro ao fazer o import quando o pacote python é instalado com todos os grupos [all] ou [avro]

Reproduzir

cd /tmp
mkdir beta-21
cd beta-21
python --version
Python 3.9.17
python -m venv .venv
source .venv/bin/activate
python -m pip install "basedosdados[all]==2.0.0b21"
python -m pip show basedosdados
Name: basedosdados
Version: 2.0.0b21
Summary: Organizar e facilitar o acesso a dados brasileiros através de tabelas públicas no BigQuery.
Home-page: https://github.com/basedosdados/mais
Author: Joao Carabetta
Author-email: [email protected]
License: MIT
Location: /tmp/beta-21/.venv/lib/python3.9/site-packages
Requires: google-api-python-client, google-cloud-bigquery, google-cloud-bigquery-connection, google-cloud-bigquery-storage, google-cloud-storage, loguru, pandas, pandas-gbq, pydata-google-auth, tomlkit, tqdm
Required-by:
Python 3.9.17 (main, Jun 30 2023, 18:04:45)
[GCC 13.1.1 20230429] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import basedosdados
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/beta-21/.venv/lib/python3.9/site-packages/basedosdados/__init__.py", line 27, in <module>
    from basedosdados.upload.table import Table
  File "/tmp/beta-21/.venv/lib/python3.9/site-packages/basedosdados/upload/table.py", line 23, in <module>
    from basedosdados.upload.datatypes import Datatype
  File "/tmp/beta-21/.venv/lib/python3.9/site-packages/basedosdados/upload/datatypes.py", line 11, in <module>
    import pandavro
  File "/tmp/beta-21/.venv/lib/python3.9/site-packages/pandavro/__init__.py", line 22, in <module>
    np.unicode_: 'string',
  File "/tmp/beta-21/.venv/lib/python3.9/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.unicode_` was removed in the NumPy 2.0 release. Use `np.str_` instead.
>>>
@aspeddro aspeddro added the bug Something isn't working label Jul 24, 2024
@aspeddro
Copy link
Contributor Author

Não apareceu só em 2.0.0b21

@aspeddro
Copy link
Contributor Author

Relacionado ynqa/pandavro#56

@aspeddro
Copy link
Contributor Author

Acho que podemos adicionar uma restrição para o numpy, <2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants