Edited: If I run the following code two times via spyder, it gives me an error the second time I run it, the first time it always works:
import pythoncom
if __name__ == '__main__':
print("hallo")
This is the error:
File "C:\Users\Oliver\AppData\Local\Programs\Python\Python36-32\lib\site-packages\win32\lib\pywintypes.py", line 129, in __import_pywin32_system_module__
assert sys.modules[modname] is not old_mod
When I restart the kernel, it works again. Also if I run it directly using python, it always works.