You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 2, 2023. It is now read-only.
Value of the python.languageServer setting: Microsoft
Expected behaviour
Script should debug without any exception.
Actual behaviour
Exception at line 14 for the script bellow.
Exception has occurred: AttributeError
Can't get attribute 'Foo' on <module '__main__' from 'c:\\Users\\gorand\\.vscode\\extensions\\ms-python.python-2020.2.64397\\pythonFiles\\lib\\python\\new_ptvsd\\no_wheels\\ptvsd\\__main__.py'>
File "E:\git\VSOGD\Misc\Python\mp_queue_example.py", line 14, in <module>
print(q.get().value) # prints 1
Steps to reproduce:
Debug this script.
from multiprocessing import Process, Queue
class Foo:
def __init__(self, value):
self.value = value
def f(q):
q.put(Foo(1))
if __name__ == '__main__':
q = Queue()
p = Process(target=f, args=(q,))
p.start()
print(q.get().value) # prints 1
p.join()