Hello, getting this error when running dbt assets ...
# ask-community
a
Hello, getting this error when running dbt assets job any idea
Copy code
--- Logging error ---
Traceback (most recent call last):
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\dbt\main.py", line 127, in main
    results, succeeded = handle_and_check(args)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\dbt\main.py", line 192, in handle_and_check
    task, res = run_from_args(parsed)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\dbt\main.py", line 246, in run_from_args
    results = task.run()
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\dbt\task\list.py", line 157, in run
    return self.output_results(generator())
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\dbt\task\list.py", line 162, in output_results   
    print(result)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\colorama\ansitowin32.py", line 41, in write      
    self.__convertor.write(text)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\colorama\ansitowin32.py", line 162, in write     
    self.write_and_convert(text)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\colorama\ansitowin32.py", line 190, in write_and_convert
    self.write_plain_text(text, cursor, len(text))
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\colorama\ansitowin32.py", line 196, in write_plain_text
    self.wrapped.flush()
OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\logging\__init__.py", line 1028, in emit
    stream.write(msg + self.terminator)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\colorama\ansitowin32.py", line 41, in write      
    self.__convertor.write(text)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\colorama\ansitowin32.py", line 162, in write     
    self.write_and_convert(text)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\colorama\ansitowin32.py", line 190, in write_and_convert
    self.write_plain_text(text, cursor, len(text))
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\colorama\ansitowin32.py", line 196, in write_plain_text
    self.wrapped.flush()
OSError: [Errno 22] Invalid argument
Call stack:
  File "C:\Program Files\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Workspaces\Dagster\dagster-env\Scripts\dbt.exe\__main__.py", line 7, in <module>
    sys.exit(main())
\events\functions.py", line 352, in fire_event    send_to_logger(STDOUT_LOG, level_tag=e.level_tag(), log_line=log_line)
  File "c:\workspaces\dagster\dagster-env\lib\site-packages\dbt\events\functions.py", line 252, in send_to_logger
    l.error(log_line)
Message: '11:52:20  Encountered an error:\n[Errno 22] Invalid argument'
Arguments: ()
Exception ignored in: <colorama.ansitowin32.StreamWrapper object at 0x000001CBA171BB88>
OSError: [Errno 22] Invalid argument
s
@owen does this look familiar to you?
o
hm haven't seen this before -- it looks like a windows-specific logging issue, and the stack trace seems to originate inside of dbt. it's possible that you could potentially get around this by changing the path that dbt attempts to write logs to (this would entail configuring a "log-path" option in the dbt_cli_resource), but I have no real intuition on if that will change things.
might be worth checking over in the dbt slack if they have any ideas