Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python nginx+;uwsgi&x2B;烧瓶+;selenium驱动程序未打开_Python_Selenium_Nginx_Flask_Uwsgi - Fatal编程技术网

Python nginx+;uwsgi&x2B;烧瓶+;selenium驱动程序未打开

Python nginx+;uwsgi&x2B;烧瓶+;selenium驱动程序未打开,python,selenium,nginx,flask,uwsgi,Python,Selenium,Nginx,Flask,Uwsgi,如果我直接在本地运行,我的selenium代码可以正常工作。但当我启动Nginx时,若代码触发了selenium驱动程序,那个么它就无法打开 DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:45283/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"bro

如果我直接在本地运行,我的selenium代码可以正常工作。但当我启动Nginx时,若代码触发了selenium驱动程序,那个么它就无法打开

DEBUG:selenium.webdriver.remote.remote_connection:POST http://127.0.0.1:45283/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserNam
e": "chrome", "platformName": "any", "goog:chromeOptions": {"prefs": {"download.default_directory": "/home/cloud_sriniakhil/flaskapp/downloads", "downl
oad.prompt_for_download": false, "directory_upgrade": true, "safebrowsing.enabled": true}, "extensions": [], "args": ["--headless"]}}}, "desiredCapabil
ities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"prefs": {"download.default_directory": "/home/cloud_sriniak
hil/flaskapp/downloads", "download.prompt_for_download": false, "directory_upgrade": true, "safebrowsing.enabled": true}, "extensions": [], "args": ["-
-headless"]}}}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1:45283
DEBUG:urllib3.connectionpool:http://127.0.0.1:45283 "POST /session HTTP/1.1" 500 357
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request



它显示了urllib3.connectionpool:“POST/session HTTP/1.1”500 357,但当我在localhost中正常运行时,我得到了状态200。 我猜nginx不允许使用该端口

我第一次在云上部署我的项目,任何帮助都会非常有用,谢谢这个错误消息

DEBUG:urllib3.connectionpool:http://127.0.0.1:45283 "POST /session HTTP/1.1" 500 357
…表示HTTP
POST/session HTTP/1.1
返回了500个内部服务器错误


500内部服务器错误 根据500内部服务器错误,服务器错误响应代码表示服务器遇到意外情况,无法满足请求。此外,此错误响应是一般响应,此错误表示服务器无法找到更好的
5xx
错误代码进行响应

更详细的错误响应(如500状态代码)以及关于请求的更多详细信息将帮助我们调试问题,并建议一个规范的解决方案,以防止错误在将来再次发生


工具书类 您可以在以下内容中找到一些相关的详细讨论:


我尝试了所有这些,但仍然,我得到了相同的错误,我也尝试了uwsgi,但仍然没有运气