[New-bugs-announce] [issue46859] NameError: free variable 'outer' referenced before assignment in enclosing scope

Norman Fung report at bugs.python.org
Fri Feb 25 18:20:43 EST 2022


New submission from Norman Fung <norman.lm.fung at gmail.com>:

In reference to ticket (which was fix for Python 3.9 or above) https://bugs.python.org/issue46672?@ok_message=msg%20413975%20created%0Aissue%2046672%20nosy_count%2C%20nosy%2C%20messages%2C%20message_count%20edited%20ok&@template=item

I encountered this problem on:
a) Python 3.8.5
b) asyncio 3.4.3

Stack
Exception in callback gather.<locals>._done_callback(<Future finis...events.py:422>) at C:\ProgramData\Anaconda3\lib\asyncio\tasks.py:758
handle: <Handle gather.<locals>._done_callback(<Future finis...events.py:422>) at C:\ProgramData\Anaconda3\lib\asyncio\tasks.py:758 created at C:\ProgramData\Anaconda3\lib\asyncio\futures.py:149>
source_traceback: Object created at (most recent call last):
  File "src\xxxxx.py", line 37, in _invoke_runners
    one_loop.run_until_complete(runner.xxxxx)
  File "C:\ProgramData\Anaconda3\lib\site-packages\nest_asyncio.py", line 90, in run_until_complete
    self._run_once()
  File "C:\ProgramData\Anaconda3\lib\site-packages\nest_asyncio.py", line 127, in _run_once
    handle._run()
  File "C:\ProgramData\Anaconda3\lib\site-packages\nest_asyncio.py", line 196, in run
    ctx.run(self._callback, *self._args)
  File "C:\ProgramData\Anaconda3\lib\asyncio\futures.py", line 356, in _set_state
    _copy_future_state(other, future)
  File "C:\ProgramData\Anaconda3\lib\asyncio\futures.py", line 335, in _copy_future_state
    dest.set_result(result)
  File "C:\ProgramData\Anaconda3\lib\asyncio\futures.py", line 237, in set_result
    self.__schedule_callbacks()
  File "C:\ProgramData\Anaconda3\lib\asyncio\futures.py", line 149, in __schedule_callbacks
    self._loop.call_soon(callback, self, context=ctx)
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\nest_asyncio.py", line 196, in run
    ctx.run(self._callback, *self._args)
  File "C:\ProgramData\Anaconda3\lib\asyncio\tasks.py", line 762, in _done_callback
    if outer.done():
NameError: free variable 'outer' referenced before assignment in enclosing scope

----------
components: asyncio
messages: 414048
nosy: asvetlov, miss-islington, norman.lm.fung, onerandomusername, sobolevn, yselivanov
priority: normal
severity: normal
status: open
title: NameError: free variable 'outer' referenced before assignment in enclosing scope
type: crash
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46859>
_______________________________________


More information about the New-bugs-announce mailing list