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

Fails to import as dateutil is not listed as requirement #644

Closed
fsiola opened this issue May 30, 2024 · 1 comment
Closed

Fails to import as dateutil is not listed as requirement #644

fsiola opened this issue May 30, 2024 · 1 comment

Comments

@fsiola
Copy link

fsiola commented May 30, 2024

Describe the bug
dateutil is used at https://github.com/marcosschroh/dataclasses-avroschema/blob/master/dataclasses_avroschema/dacite_config.py#L7 but is not listed as dependency.

The library them fails to load with ModuleNotFoundError: No module named 'dateutil'

To Reproduce

python -m venv .venv
source .venv/bin/activate
pip install dataclasses-avroschema==0.60.0
from dataclasses_avroschema import AvroModel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../dataclasses_avroschema/__init__.py", line 1, in <module>
    from .schema_generator import AvroModel  # noqa: F401 I001
  File ".../dataclasses_avroschema/schema_generator.py", line 11, in <module>
    from .dacite_config import generate_dacite_config
  File ".../dataclasses_avroschema/dacite_config.py", line 7, in <module>
    from dateutil import parser
ModuleNotFoundError: No module named 'dateutil'

Expected behavior
Library imports correctly

@marcosschroh
Copy link
Owner

marcosschroh commented May 30, 2024

Ups! I forgot to included yesterday in the PR. I guess the tests passed because I installed the library with all the extra dependencies and dateutil might be included on one of them. Thanks for reporting it !

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

2 participants