after upgrading to 1.3.1 I have started seeing thi...
# ask-community
b
after upgrading to 1.3.1 I have started seeing this error, even though my jobs succeed
Copy code
Exception ignored in: <generator object build_resources at 0x7f67271365e0>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/build_resources.py", line 112, in build_resources
File "/usr/local/lib/python3.10/site-packages/dagster/_utils/__init__.py", line 511, in generate_teardown_events
File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/resources_init.py", line 282, in resource_initialization_event_generator
File "/usr/local/lib/python3.10/site-packages/dagster/_utils/__init__.py", line 511, in generate_teardown_events
File "/usr/local/lib/python3.10/site-packages/dagster/_core/execution/resources_init.py", line 352, in single_resource_event_generator
File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
File "/usr/local/lib/python3.10/site-packages/dagster/_core/errors.py", line 268, in user_code_error_boundary
File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
File "/usr/local/lib/python3.10/site-packages/dagster/_core/errors.py", line 235, in raise_execution_interrupts
File "/usr/local/lib/python3.10/contextlib.py", line 142, in __exit__
File "/usr/local/lib/python3.10/site-packages/dagster/_utils/interrupts.py", line 98, in raise_interrupts_as
File "/usr/local/lib/python3.10/site-packages/dagster/_utils/interrupts.py", line 27, in _replace_interrupt_signal
File "/usr/local/lib/python3.10/signal.py", line 56, in signal
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object
d
Hi Binoy - we're looking into this. Do you recognize that
build_resources
call from somewhere in your code?
and where exactly are you seeing the error?
One possibility that I could see is that you might not be using
build_resources
as a contextmanager? i.e. you want
Copy code
with build_resources(...) as resources:
  conn = resources.db_connection
not
Copy code
resources = build_resources(...) 
conn = resources.db_connection
Disregard if you're already doing that though
last question - what version were you on before you upgraded?
b
I am doing manual build and run of dbt cli resource like this snippet Trying to optimize my load times and multiple repo creation @daniel
I was using
1.2.7
before this
d
and the same code didn't hit that error?
b
I dont know, I just introduced this code..
d
ah ok - i misinterpreted 'after upgrading to 1.3.1' as implying that the same code was working before that version
b
d
I'll take a look at this, thanks for the code
b
Sorry about confusion.. i did 2 major things together
but just for clarification, the above code works.. the failure and error message happens after or at the time of completion of job
The code snippet is my global module level init flow.. I wanted to pre-generate the dbt manifest at startup and not have it re-generate for each repository startup
d
We're working on a fix for this - the good news is we think this should be harmless other than annoying logspew (let us know if that is different than what you're seeing here though)