Hi team, I got this error this morning while execu...
# dagster-plus
q
Hi team, I got this error this morning while executing an op that used
DynamicOut
and yielded
DynamicOutput
Copy code
dagster._core.errors.DagsterExecutionInterruptedError
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/execute_plan.py", line 262, in dagster_event_sequence_for_step
    for step_event in check.generator(step_events):
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/execute_step.py", line 375, in core_dagster_event_sequence_for_step
    for evt in _type_check_and_store_output(step_context, user_event):
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/execute_step.py", line 428, in _type_check_and_store_output
    for evt in _store_output(step_context, step_output_handle, output):
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/execute_step.py", line 603, in _store_output
    for elt in iterate_with_context(
  File "/usr/local/lib/python3.11/site-packages/dagster/_utils/__init__.py", line 445, in iterate_with_context
    next_output = next(iterator)
                  ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/execution/plan/execute_step.py", line 593, in _gen_fn
    gen_output = output_manager.handle_output(output_context, output.value)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/storage/upath_io_manager.py", line 261, in handle_output
    context.log.debug(self.get_writing_output_log_message(path))
  File "/usr/local/lib/python3.11/logging/__init__.py", line 1477, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/local/lib/python3.11/logging/__init__.py", line 1634, in _log
    self.handle(record)
  File "/usr/local/lib/python3.11/logging/__init__.py", line 1644, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.11/logging/__init__.py", line 1706, in callHandlers
    hdlr.handle(record)
  File "/usr/local/lib/python3.11/logging/__init__.py", line 978, in handle
    self.emit(record)
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/log_manager.py", line 290, in emit
    handler.handle(dagster_record)
  File "/usr/local/lib/python3.11/logging/__init__.py", line 978, in handle
    self.emit(record)
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/instance/__init__.py", line 200, in emit
    self._instance.handle_new_event(event)
  File "/usr/local/lib/python3.11/site-packages/dagster/_core/instance/__init__.py", line 1910, in handle_new_event
    self._event_storage.store_event(event)
  File "/usr/local/lib/python3.11/site-packages/dagster_cloud/storage/event_logs/storage.py", line 397, in store_event
    self._execute_query(
  File "/usr/local/lib/python3.11/site-packages/dagster_cloud/storage/event_logs/storage.py", line 275, in _execute_query
    res = self._graphql_client.execute(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dagster_cloud_cli/core/graphql_client.py", line 78, in execute
    return self._execute_retry(query, variable_values, headers)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dagster_cloud_cli/core/graphql_client.py", line 154, in _execute_retry
    response = <http://self._session.post|self._session.post>(
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
                       ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/http/client.py", line 1375, in getresponse
    response.begin()
  File "/usr/local/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/socket.py", line 706, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ssl.py", line 1278, in recv_into
    return self.read(nbytes, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ssl.py", line 1134, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dagster/_utils/interrupts.py", line 82, in _new_signal_handler
    raise error_cls()
The above exception occurred during handling of the following exception:
TypeError: HTTPConnection.getresponse() got an unexpected keyword argument 'buffering'
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse(buffering=True)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Any help why I got this error?
z
this looks like a library versioning issue - urllib3 released v2 last week or the week before with some breaking changes and isn't pinned by a lot of libraries that depend on it transitively. try pinning urllib3<2.0.0 in your requirements
q
I don't use
urllib
is not a requirement in my project. This is what I have in my
requirements.txt
Copy code
dagster
dagster-cloud
dagster-pandas
dagster-slack
dagster-dbt
db-dtypes
dagster-gcp
dagster-gcp-pandas
backoff
z
yes but urllib3 is a transitive dependency of yours
if you run
pip show urllib3
in your Dagster environment you'll see it's required by
requests
, which is required by
dagster
q
I guess it has to be pinned on the dagster side then. Will I not risk breaking certain things when I pin the version?
z
it looks like your environment is already broken...
pip will resolve your dependencies to make sure that it downloads the versions of your other requirements that are compatible with urllib3<2.0.0. if some of your dependencies rely on urllib3>2.0.0 but don't pin it to that then you have a problem because it appears that some of your dependencies implicitly rely on urllib3<2.0.0 as your code is breaking when it tries to use that library
it doesn't really matter if dagster pins it or if you do, it's the same result at the end of the day. hopefully urllib3 is actually the issue and I'm not leading you down a rabbit hole unnecessarily, but I ran into a very similar issue recently and pinning urllib3<2.0.0 worked for me
q
Awesome, thanks Zach!
🎉 1