Hello! I'm attempting to run <setup tutorial >and ...
# announcements
j
Hello! I'm attempting to run setup tutorial and getting error below. Is Python 3.6 supported?
Copy code
Traceback (most recent call last):
  File "hello_dagster.py", line 1, in <module>
    from dagster import execute_pipeline, pipeline, solid
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/__init__.py", line 5, in <module>
    from dagster.core.definitions import (
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/core/definitions/__init__.py", line 2, in <module>
    from .decorators import (
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/core/definitions/decorators/__init__.py", line 3, in <module>
    from .job import job
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/core/definitions/decorators/job.py", line 2, in <module>
    from dagster.core.definitions.job import JobDefinition
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/core/definitions/job.py", line 4, in <module>
    from dagster.core.instance import DagsterInstance
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/core/instance/__init__.py", line 12, in <module>
    from dagster.core.definitions.pipeline import PipelineDefinition, PipelineSubsetDefinition
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/core/definitions/pipeline.py", line 24, in <module>
    from .mode import ModeDefinition
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/core/definitions/mode.py", line 5, in <module>
    from dagster.core.definitions.executor import ExecutorDefinition, default_executors
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/core/definitions/executor.py", line 138, in <module>
    "marker_to_close": Field(str, is_required=False),
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/config/field.py", line 237, in __init__
    self.config_type = check.inst(self._resolve_config_arg(config), ConfigType)
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/config/field.py", line 221, in _resolve_config_arg
    config_type = resolve_to_config_type(config)
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/config/field.py", line 81, in resolve_to_config_type
    if is_typing_type(dagster_type):
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/utils/typing_api.py", line 152, in is_typing_type
    or is_closed_python_optional_type(ttype)
  File "/Users/jessicas/.pyenv/versions/dagster-env/lib/python3.6/site-packages/dagster/utils/typing_api.py", line 16, in is_closed_python_optional_type
    return origin == typing.Union and len(ttype.__args__) == 2 and ttype.__args__[1] == type(None)
  File "/Users/jessicas/.pyenv/versions/3.6.0/lib/python3.6/typing.py", line 760, in __eq__
    return self._subs_tree() == other
  File "/Users/jessicas/.pyenv/versions/3.6.0/lib/python3.6/typing.py", line 760, in __eq__
    return self._subs_tree() == other
  File "/Users/jessicas/.pyenv/versions/3.6.0/lib/python3.6/typing.py", line 760, in __eq__
    return self._subs_tree() == other
  [Previous line repeated 227 more times]
  File "/Users/jessicas/.pyenv/versions/3.6.0/lib/python3.6/typing.py", line 759, in __eq__
    if not isinstance(other, _Union):
RecursionError: maximum recursion depth exceeded in __instancecheck__
s
Hey Jessica! Can you copy and paste the contents of
hello_dagster.py
👋 1
j
Copy code
from dagster import execute_pipeline, pipeline, solid

@solid
def get_name(_):
    return 'dagster'

@solid
def hello(context, name: str):
    <http://context.log.info|context.log.info>('Hello, {name}!'.format(name=name))

@pipeline
def hello_pipeline():
    hello(get_name())
command to run:
dagster pipeline execute -f hello_dagster.py
Package versions:
Copy code
dagit==0.9.18
dagster==0.9.18
dagster-graphql==0.9.18
pip version
Copy code
pip 9.0.1 from /Users/jessicas/.pyenv/versions/3.6.0/envs/dagster-env/lib/python3.6/site-packages (python 3.6)
s
this is so very strange. can you delete the the
str
typehint and see what happens
d
Hi Jessica - is using a more recent python 3.6 version an option for you? I can reproduce this in 3.6.0 but not in later versions of python 3.6, The version that our test suite runs against is 3.6.11
😮 1
j
Thanks all! This raises an interesting point. We're evaluating multiple solutions (Dagster, Airflow, Prefect and Argo) to migrate off of Pinball (Pinterest open source). Code base is currently Python 3.4. Not ideal but bandwidth constraints prevent Python upgrade. I need to noodle on how we can handle this
Oh by the way @daniel last night I tested with 3.5-3.7 and all return same error. May be a
pyenv
issue?
d
Possibly yeah - what minor version of 3.7 were you using?
j
3.7.0
d
got it - there might be something similar going on there, we test against 3.7.8
Is there a particular reason you're on 3.7.0 specifically?
I think there have been a bunch of bugfixes and improvements between those two releases (3.7.0 and 3.7.8)
j
Installing that version now
Works! Thank you Daniel!
Also I reported something incorrectly: I tested
3.5-3.7
with Airflow not Dagster. Apologies. Too many tests 🤯
d
ah great! Dagster should work on 3.6 and up (at least on recent minor versions)