https://dagster.io/ logo
Title
b

Bryan Chavez

12/27/2021, 2:19 PM
I'm trying to setup Dagster with Docker but I'm getting this error when triggering jobs, is there something wrong with the config I have below for the run_launcher?
Traceback (most recent call last):
  
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    
return _run_code(code, main_globals, None,
  
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    
exec(code, run_globals)
  
File "/usr/local/lib/python3.8/site-packages/dagster/__main__.py", line 3, in <module>
    
main()
  
File "/usr/local/lib/python3.8/site-packages/dagster/cli/__init__.py", line 50, in main
    
cli(auto_envvar_prefix=ENV_PREFIX)  # pylint:disable=E1123
  
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    
return self.main(*args, **kwargs)
  
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    
rv = self.invoke(ctx)
  
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    
return _process_result(sub_ctx.command.invoke(sub_ctx))
  
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    
return _process_result(sub_ctx.command.invoke(sub_ctx))
  
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    
return ctx.invoke(self.callback, **ctx.params)
  
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    
return callback(*args, **kwargs)
  
File "/usr/local/lib/python3.8/site-packages/dagster/cli/api.py", line 48, in execute_run_command
    
DagsterInstance.from_ref(args.instance_ref)
  
File "/usr/local/lib/python3.8/site-packages/dagster/core/instance/__init__.py", line 423, in from_ref
    
run_launcher=instance_ref.run_launcher,
  
File "/usr/local/lib/python3.8/site-packages/dagster/core/instance/ref.py", line 264, in run_launcher
    
return self.run_launcher_data.rehydrate() if self.run_launcher_data else None
  
File "/usr/local/lib/python3.8/site-packages/dagster/serdes/config_class.py", line 56, in rehydrate
    
module = importlib.import_module(self.module_name)
  
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    
return _bootstrap._gcd_import(name[level:], package, level)
  
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  
File "/usr/local/lib/python3.8/site-packages/dagster_docker/__init__.py", line 4, in <module>
    
from .docker_run_launcher import DockerRunLauncher
  
File "/usr/local/lib/python3.8/site-packages/dagster_docker/docker_run_launcher.py", line 5, in <module>
    
from dagster.core.launcher.base import (
ImportError: cannot import name 'ResumeRunContext' from 'dagster.core.launcher.base' (/usr/local/lib/python3.8/site-packages/dagster/core/launcher/base.py)
run_launcher:
#  module: dagster.core.launcher
#  class: DefaultRunLauncher
  module: dagster_docker
  class: DockerRunLauncher
  config:
    env_vars:
      - DAGSTER_POSTGRES_USER
      - DAGSTER_POSTGRES_PASSWORD
      - DAGSTER_POSTGRES_DB
    network: docker_khde_network
    container_kwargs:
      volumes:
        - repository.py:/opt/dagster/app/kh_dagster/
d

daniel

12/27/2021, 3:15 PM
Hi - what version of the dagster and dagster_docker packages do you have installed? dagster_docker should have a dagster pin in its requirements that in theory should keep this kind of error from happening
b

Bryan Chavez

12/27/2021, 4:41 PM
upgraded the version to the latest and it resolved the issue. Thanks for your help!
:condagster: 1