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

TypeError: issubclass() arg 1 must be a class #41

Closed
SBurwash opened this issue May 23, 2023 · 3 comments
Closed

TypeError: issubclass() arg 1 must be a class #41

SBurwash opened this issue May 23, 2023 · 3 comments

Comments

@SBurwash
Copy link

Hey everyone,

I am getting this error when running dbt-dry-run

From the larger context:

2023-05-23T15:20:52.902022Z [info     ] Environment 'prod' is active
Using project-dir at `/home/runner/work/meltano/meltano/transform`...
Using profile.yml at `/home/runner/work/meltano/meltano/transform/profiles/bigquery`...
Traceback (most recent call last):
  File "/home/runner/work/meltano/meltano/.meltano/utilities/dbt-dry-run/venv/bin/dbt-dry-run", line 5, in <module>
    from dbt_dry_run.__main__ import main
  File "/home/runner/work/meltano/meltano/.meltano/utilities/dbt-dry-run/venv/lib/python3.8/site-packages/dbt_dry_run/__main__.py", line 1, in <module>
    from dbt_dry_run.cli import app
  File "/home/runner/work/meltano/meltano/.meltano/utilities/dbt-dry-run/venv/lib/python3.8/site-packages/dbt_dry_run/cli.py", line 8, in <module>
    from dbt_dry_run.adapter.service import DbtArgs, ProjectService
  File "/home/runner/work/meltano/meltano/.meltano/utilities/dbt-dry-run/venv/lib/python3.8/site-packages/dbt_dry_run/adapter/service.py", line 13, in <module>
    from dbt_dry_run.models import Manifest
  File "/home/runner/work/meltano/meltano/.meltano/utilities/dbt-dry-run/venv/lib/python3.8/site-packages/dbt_dry_run/models/__init__.py", line 1, in <module>
    from .manifest import Macro, Manifest, Node, NodeConfig, NodeDependsOn, OnSchemaChange
  File "/home/runner/work/meltano/meltano/.meltano/utilities/dbt-dry-run/venv/lib/python3.8/site-packages/dbt_dry_run/models/manifest.py", line 28, in <module>
    class PartitionBy(BaseModel):
  File "pydantic/main.py", line [19](https://github.com/potloc/meltano/actions/runs/5059083507/jobs/9080108265#step:13:20)7, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 506, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/typing.py", line 774, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class

Would this be user error? How may I solve this?

@ccharlesgb
Copy link
Collaborator

ccharlesgb commented May 23, 2023

Hey,

This is probably a compatibility issue between versions. We should really change the requirements for the package to be the correct version of dbt. The compatibility for the last two dbt versions is:

dbt-dry-run -> dbt
0.6.7 -> 1.5
0.6.4, 0.6.5, 0.6.6 -> 1.4

Hmm actually I read that stack trace wrong, looks like it could be a pydantic compatibility issue? Do you have a dump of all the requirements installed in your python venv?

@ccharlesgb
Copy link
Collaborator

Did some reading on the error. Does this workaround help?

explosion/spaCy#12659

@SBurwash
Copy link
Author

Hey @ccharlesgb , seems the error fixed itself once we redeployed ;) thanks for looking into it though! Will be closing the issue

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