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

module 'marshmallow.fields' has no attribute 'LocalDateTime' #3

Open
vallsv opened this issue Mar 16, 2022 · 1 comment
Open

module 'marshmallow.fields' has no attribute 'LocalDateTime' #3

vallsv opened this issue Mar 16, 2022 · 1 comment

Comments

@vallsv
Copy link

vallsv commented Mar 16, 2022

Hi, here is an error when using the following marshmallow libs.

marshmallow               3.13.0             pyhd8ed1ab_0    conda-forge
marshmallow-enum          1.5.1                    pypi_0    pypi
marshmallow-jsonschema    0.12.0                   pypi_0    pypi

On my side i have just commented out fields.LocalDateTime from your mapping file.
You would maybe like to have the same patch on your side? Depending on the marshmallow versions?
Let me know.

Here is the full backtrace:

Traceback (most recent call last):
  File "scripts/gen_typescript.py", line 1, in <module>
    from typemallow import ts_interface, generate_ts
  File "/nobackup/lvalls1/valls/Software/miniconda3/envs/tomodemo-daiquiri-env/lib/python3.7/site-packages/typemallow/__init__.py", line 2, in <module>
    from .mappings import mappings
  File "/nobackup/lvalls1/valls/Software/miniconda3/envs/tomodemo-daiquiri-env/lib/python3.7/site-packages/typemallow/mappings.py", line 17, in <module>
    fields.LocalDateTime: 'Date',
AttributeError: module 'marshmallow.fields' has no attribute 'LocalDateTime'
@vallsv
Copy link
Author

vallsv commented Mar 16, 2022

Here is my workaround without patching the lib files

# Workaround related to https://github.com/adenh93/typemallow/issues/3
from marshmallow import fields
fields.LocalDateTime = None

from typemallow import ts_interface, generate_ts

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