boakley / robotframework-hub

Web app for accessing robot framework assets
https://github.com/boakley/robotframework-hub/wiki
Apache License 2.0
170 stars 60 forks source link

Presense of python scripts reading sys.arg[] crash server #13

Open mkukulski opened 10 years ago

mkukulski commented 10 years ago

robotframework-hub 0.3 Running server with python -m rfhub D:\workplace\suite if suite contain in hierarchy any python scripts parsing/reading file then it crash

Example file:

!/usr/bin/python

from xml.dom import minidom import sys, getopt plik=sys.argv[1] xmldoc=minidom.parse(plik) MO_list=xmldoc.getElementsByTagName('object') print MO_list[0].getAttribute('name')


start-up error:

bummer: Importing test library 'D:\workplace\suite\resources\Ofinder.py' failed: IOError: [Errno 13] Permission denied: 'D:\workplace\suite' Traceback (most recent call last): File "D:\workplace\suite\resources\Ofinder.py", line 9, in xmldoc=minidom.parse(plik) File "C:\APPS\python\lib\xml\dom\minidom.py", line 1914, in parse return expatbuilder.parse(file) File "C:\APPS\python\lib\xml\dom\expatbuilder.py", line 922, in parse fp = open(file, 'rb') PYTHONPATH: C:\APPS\python\lib\site-packages\robot\libraries C:\APPS\python\lib\site-packages C:\WINDOWS\system32\python27.zip C:\APPS\python\DLLs C:\APPS\python\lib C:\APPS\python\lib\plat-win C:\APPS\python\lib\lib-tk C:\APPS\python C:\APPS\python\lib\site-packages\wx-2.8-msw-unicode . d:\tmp


Expected: server should ignore any exceptions coming and continue working.

boakley commented 10 years ago

Thanks for the report. I'll look into it.

boakley commented 10 years ago

Now that I've looked a little more closely... it appears the server is ignoring the error. At least on my machine, when I introduce the file you gave in the bug report I get the error like you, but the server still starts up. The output is there for debugging purposes.

Are you saying that the server won't start for you in the above scenario?

mkukulski commented 10 years ago

Yes, I run it on Windows 7 and after error I see command prompt, python process is not present in Task Manager, and when try to connect to 7070 port, it fails.