File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,14 @@ def progress_callback(
105105 """Displays a progress bar while the query is running"""
106106 global current_display , current_display_id , previous_display_html
107107
108- import bigframes ._config
109- import bigframes .core .events
108+ try :
109+ import bigframes ._config
110+ import bigframes .core .events
111+ except ImportError :
112+ # Since this gets called from __del__, skip if the import fails to avoid
113+ # ImportError: sys.meta_path is None, Python is likely shutting down.
114+ # This will allow cleanup to continue.
115+ return
110116
111117 progress_bar = bigframes ._config .options .display .progress_bar
112118
Original file line number Diff line number Diff line change @@ -140,10 +140,9 @@ def test_to_datetime(session: bigframes.session.Session):
140140
141141def test_to_timedelta (session : bigframes .session .Session ):
142142 offsets = np .arange (5 )
143- unit = "s"
144143
145- bpd_result = bpd .to_timedelta (offsets , unit = unit )
146- session_result = session .to_timedelta (offsets , unit = unit )
144+ bpd_result = bpd .to_timedelta (offsets , unit = "s" )
145+ session_result = session .to_timedelta (offsets , unit = "s" )
147146
148147 global_session = bpd .get_global_session ()
149148 assert global_session is not session
You can’t perform that action at this time.
0 commit comments