```TypeError: ConfigurableResourceFactory.__init__...
# troubleshooting
i
Copy code
TypeError: ConfigurableResourceFactory.__init__() takes 1 positional argument but 6 were given
  File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_core\errors.py", line 287, in user_code_error_boundary
    yield
  File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_grpc\server.py", line 242, in __init__
    loadable_targets = get_loadable_targets(
  File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_grpc\utils.py", line 40, in get_loadable_targets
    else loadable_targets_from_python_file(python_file, working_directory)
  File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_core\workspace\autodiscovery.py", line 26, in loadable_targets_from_python_file
    loaded_module = load_python_file(python_file, working_directory)
  File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_core\code_pointer.py", line 83, in load_python_file
    return import_module_from_path(module_name, python_file)
  File "C:\Users\user\Documents\GitHub\datawarehouse\meltano\.meltano\utilities\dagster\venv\lib\site-packages\dagster\_seven\__init__.py", line 49, in import_module_from_path
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\user\Documents\GitHub\datawarehouse\meltano/orchestrate/dagster/repository.py", line 25, in <module>
    "dbt": DbtCliResource(
I'm getting weird behavior with dagster. I had it working when it was in my old repo, but I had to move my project to another repository, and after running meltano install in that repo it isn't working.
Copy code
from dagster_dbt import load_assets_from_dbt_project, DbtCliResource

DBT_PROJECT_PATH = str(Path(__file__).parent.parent.parent / "transform")
DBT_PROFILE_PATH = str(Path(__file__).parent.parent.parent / "transform/profiles/snowflake")
DBT_TARGET_PATH = str(Path(__file__).parent.parent.parent / "transform/target")
DBT_PROFILE = os.getenv('DBT_PROFILE')
DBT_TARGET = os.getenv('DBT_TARGET_PATH')

class MeltanoEnv(enum.Enum):
    dev = enum.auto()
    prod = enum.auto()

MELTANO_PROJECT_DIR = os.getenv("MELTANO_PROJECT_ROOT", os.getcwd())
MELTANO_BIN = os.getenv("MELTANO_BIN", "meltano")

resources= {
    "dbt": DbtCliResource(
        DBT_PROJECT_PATH,
        DBT_PROFILE_PATH,
        [],
        DBT_TARGET,
        DBT_PROFILE),
    # "meltano": meltano_resource,
}
Here's what my repository.py looks like. I had just changed this to (ironically) fix the same issue I was having before I moved the repo. Side note - when I run the
meltano invoke dagster:start
my command line doesn't have the green/blue colored text like it usually does. and the CLI level logs look a bit different so I don't know if my install is weird or something. I have meltano installed with pipx but I also tried creating a venv in my project with my old requirements installed and that failed too.
a
I believe the dagster ext repo updated recently so you might be getting a new version. Have you tried pinning to the previous commit of the repo?
So add
@v0.1.0
at the end of your dagster_ext pip_url to revert to the older one. You might have 0.1.1 installed which allows you to use higher versions of dagster and dbt
🙌 1
i
that worked! thanks. I was wondering if that was it because I didn't have it set to any specific version
Copy code
- name: dagster
    variant: quantile-development
    pip_url: dagster-ext==0.1.0 dbt-core~=1.7.0 dbt-snowflake~=1.7.0 pendulum<3
a
You will need to update your dagster_dbt code to take advantage of newer versions of dagster & dagster_dbt
i
like in my meltano.yml?
oh you mean in my repository.py?
a
Yes I'm not sure what it needs to look like I still have it on my to-do list
worth checking the latest dagster_dbt docs https://docs.dagster.io/_apidocs/libraries/dagster-dbt