s-knibbs / dataclasses-jsonschema

JSON schema generation from dataclasses
MIT License
167 stars 38 forks source link

ModuleNotFoundError: No module named '_decimal' #149

Closed y-mironov closed 3 years ago

y-mironov commented 3 years ago

I have update PyPy 7.3.2 to PyPy 7.3.3 (from ppa)

python -V
Python 3.6.12 (7.3.3+dfsg-1~ppa1~ubuntu18.04, Nov 21 2020, 20:44:11)
[PyPy 7.3.3 with GCC 7.5.0]

and now my project starting with error

from dataclasses_jsonschema import JsonSchemaMixin
../pypy/site-packages/dataclasses_jsonschema/__init__.py:5: in <module>
    from _decimal import Decimal
E   ModuleNotFoundError: No module named '_decimal'

I found what in your source code present two diferent type of import Decimal Can you change from _decimal import Decimal to without underscore import ? I tryed this fix local and this fixed the problem.