Closed ergorion closed 3 years ago
Hi Axel,
I agree it's not nice and should be solved. However I'm having some trouble replicating this. I'm not sure the content of the script matters much. I though it maybe had something to do with the Polarion server, the server you use is probably slower (as mine is running on the local machine) so it may need more time when Python is shutting down. But I'm too unfamiliar with how Python shuts down to know if that might be an issue. I'll do some test with a different server soon and see if i find something. If you find something please let me know.
Jesper
I'm comparing the two Polarion servers again, that I have access to: 1) older version of Polarion, soon to be migrated, ending the session works: `DEBUG:zeep.transports:HTTP Post to http://server-where-logoff-works/polarion/ws/services/SessionWebService: <?xml version='1.0' encoding='utf-8'?>
I have done some research on this error, and according to this website: https://github.com/SeleniumHQ/selenium/issues/8571 It might make sense to change the behaviour. Instead of closing the session in the del method, one could use the context handler protocol and use the methods enter and exit. This would probably also affect the init method.
What are your thoughts?
Nice find, there are some options here. The context handler is nice, but i think i would prefer trying the exit handler (https://docs.python.org/3/library/atexit.html) mainly because it does not require the user to think about the 'with' context handler.
Can you try that commit i made locally to see if polarion exitsts without exception?
sorry have not come around to testing yet, will try next week.
I haven't tested it extensively yet, but at first look this seems to solve the exception! Thanx!
Hi!
I'm using python-polarion (0.1.14) with python 3.8 under Win10 to access two different Polarion servers. Whenever my script ends, I get the following output:
Exception ignored in: <function Polarion.del at 0x000001D9CE0ADF70> Traceback (most recent call last): File "C:\Users\sa4238x\Anaconda3\lib\site-packages\polarion\polarion.py", line 43, in del File "C:\Users\sa4238x\Anaconda3\lib\site-packages\zeep-4.0.0-py3.8.egg\zeep\proxy.py", line 46, in call File "C:\Users\sa4238x\Anaconda3\lib\site-packages\zeep-4.0.0-py3.8.egg\zeep\wsdl\bindings\soap.py", line 127, in send File "C:\Users\sa4238x\Anaconda3\lib\site-packages\zeep-4.0.0-py3.8.egg\zeep\transports.py", line 107, in post_xml File "C:\Users\sa4238x\Anaconda3\lib\site-packages\zeep-4.0.0-py3.8.egg\zeep\transports.py", line 73, in post File "C:\Users\sa4238x\Anaconda3\lib\site-packages\requests\sessions.py", line 590, in post File "C:\Users\sa4238x\Anaconda3\lib\site-packages\requests\sessions.py", line 528, in request File "C:\Users\sa4238x\Anaconda3\lib\site-packages\requests\sessions.py", line 448, in prepare_request File "C:\Users\sa4238x\Anaconda3\lib\site-packages\requests\cookies.py", line 544, in merge_cookies File "C:\Users\sa4238x\Anaconda3\lib\site-packages\requests\cookies.py", line 352, in update File "C:\Users\sa4238x\Anaconda3\lib\copy.py", line 92, in copy ImportError: sys.meta_path is None, Python is likely shutting down
It's not a real functional problem, still it's not nice. Thanx, Axel