Dear all:
I'd like to run a program organized by python.
But it can only be executed once as following.
In 1]: runfile('D:/untitled1.py', wdir='D:')
In 2]: runfile('D:/untitled1.py', wdir='D:')
Reloaded modules: CLR, clr, ZOSAPI_NetHelper, ZOSAPI
Traceback (most recent call last):
File "D:\untitled1.py", line 139, in <module>
zos = PythonStandaloneApplication()
File "D:\untitled1.py", line 20, in __init__
clr.AddReference(NetHelper)
AttributeError: module 'clr' has no attribute 'AddReference'
I use the anaconda 64 bits with spyder 5.3.3.
I have installed the pythonnet by
pip install pythonnet
And it seems working normally so the program can be run once.
But it cannot be run more than twice.
Does anyone encounter this problem before?