You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results in the following stack trace and error:
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.12/site-packages/datamodel_code_generator/__main__.py", line 428, in main
generate(
File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.12/site-packages/datamodel_code_generator/__init__.py", line 462, in generate
results = parser.parse()
^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.12/site-packages/datamodel_code_generator/parser/base.py", line 1289, in parse
body = code_formatter.format_code(body)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.12/site-packages/datamodel_code_generator/format.py", line 226, in format_code
code = self.apply_black(code)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.12/site-packages/datamodel_code_generator/format.py", line 234, in apply_black
return black.format_str(
^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.12/site-packages/black/__init__.py", line 1232, in format_str
dst_contents = _format_str_once(src_contents, mode=mode, lines=lines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.12/site-packages/black/__init__.py", line 1246, in _format_str_once
src_node = lib2to3_parse(src_contents.lstrip(), mode.target_versions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/mambaforge/base/lib/python3.12/site-packages/black/parsing.py", line 90, in lib2to3_parse
raise exc from None
black.parsing.InvalidInput: Cannot parse: 28209:4: The concrete type can be `AppRecurringPricing` for recurring billing or `AppUsagePricing` for usage-based billing.
I assumed I'd get a Pydantic schema definition in the output file. This is my first time trying to use datamode-codegen, so my expectations were quite vague. :-)
Version:
OS: MacOS Sonoma 14.2.1
Python version: 3.12.2 (Installed using Conda)
datamodel-code-generator version: 0.25.5
The text was updated successfully, but these errors were encountered:
Describe the bug
I have downloaded the latest GraphQL schema of our Shopify store with the following commands:
The downloaded schema is attached below.
I am attempting to use the following command to generate data models for it:
This results in the following stack trace and error:
To Reproduce
Example schema:
Renamed to .txt to allow uploading: shopify_schema_2024-04.txt
Used commandline:
Expected behavior
I assumed I'd get a Pydantic schema definition in the output file. This is my first time trying to use
datamode-codegen
, so my expectations were quite vague. :-)Version:
The text was updated successfully, but these errors were encountered: