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
configVersion: 2.0.0python:
packageName: avalara-async-clientversion: "0.1.0"description: Avalara Async API Client SDK for Pythongeneration:
baseServerUrl: https://sandbox-rest.avatax.com
Running the sample from the README crashes badly.
Traceback (most recent call last):
File "/Users/pd/tmp/avalara/avalara-async-client-source/avalara_sample.py", line 3, in <module>
import avalara_async_client
File "/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/__init__.py", line 10, in <module>
from .sdk import *
File "/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/sdk.py", line 3, in <module>
from .basesdk import BaseSDK
File "/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/basesdk.py", line 3, in <module>
from .sdkconfiguration import SDKConfiguration
File "/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/sdkconfiguration.py", line 12, in <module>
from avalara_async_client import models
File "/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/models/__init__.py", line 44, in <module>
from .activecertificatemodel import (
...<2 lines>...
)
File "/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/models/activecertificatemodel.py", line 4, in <module>
from .certificatemodel import CertificateModel, CertificateModelTypedDict
File "/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/models/certificatemodel.py", line 14, in <module>
from .customermodel import CustomerModel, CustomerModelTypedDict
File "/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/models/customermodel.py", line 4, in <module>
from .activecertificatemodel import (
...<2 lines>...
)
ImportError: cannot import name 'ActiveCertificateModel' from partially initialized module 'avalara_async_client.models.activecertificatemodel' (most likely due to a circular import) (/Users/pd/tmp/avalara/avalara-async-client-source/src/avalara_async_client/models/activecertificatemodel.py)
simplesagar
changed the title
Circular references in models are not handled in Python
[SPE-4623] Circular references in models are not handled in Python
Jan 15, 2025
Hi @pietrodn thanks for the report. We'll investigate! Could you try going through the onboarding steps shown in your workspace? So instead of generate you would run speakeasy quickstart and run ? Thanks
Hi, the generated Python client crashes with OpenAPI models that have circular references.
I'm generating the APIs from the Avalara specification (https://rest.avatax.com/swagger/v2/swagger.json) like this:
as
gen.yaml
I am using:Running the sample from the README crashes badly.
SPE-4623
The text was updated successfully, but these errors were encountered: