dbt-labs / dbt-rpc

A server that can compile and run queries in the context of a dbt project. Additionally, it provides methods that can be used to list and terminate running processes.
https://docs.getdbt.com/reference/commands/rpc
Apache License 2.0
19 stars 7 forks source link

[CT-1672] Error (No module named 'dbt.contracts.graph.nodes') after installation dbt-rpc v0.3.0 #110

Closed pgrivachev closed 1 year ago

pgrivachev commented 1 year ago

After installation dbt-rpc v0.3.0 I have the following error:

>dbt-rpc --version                                                                                                                                                                                                                          
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/dbt-rpc", line 5, in <module>
    from dbt_rpc.__main__ import main
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt_rpc/__main__.py", line 25, in <module>
    from dbt_rpc.task.server import RPCServerTask
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt_rpc/task/server.py", line 2, in <module>
    from . import sql_commands  # noqa
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dbt_rpc/task/sql_commands.py", line 12, in <module>
    from dbt.contracts.graph.nodes import RPCNode
ModuleNotFoundError: No module named 'dbt.contracts.graph.nodes'

I have Python 3.7.9. Steps to reproduce:

python3 -m pip install dbt-core dbt-bigquery dbt-rpc
sivankumar86 commented 1 year ago

I am facing same issue. is there any workaround ?

jtcohen6 commented 1 year ago

Hi all, sorry about that - dbt-rpc==0.3.0 was released for compatibility with a forthcoming release of dbt-core (v1.4, relevant changes in https://github.com/dbt-labs/dbt-rpc/pull/103), but it looks like we didn't bump the version requirement here: https://github.com/dbt-labs/dbt-rpc/blob/521ec418506769431ed9138935a95bd33a18b1cd/setup.py#L33

We should cut a new release of dbt-rpc==0.3.1 with the version lower bound in place, now that dbt-core==1.4.0rc1 has been released, and we should yank v0.3.0 from PyPI.

For now, you should pin your installation to dbt-rpc<0.3.0. And FYI that dbt-rpc is being deprecated for good this year!