01joy / news-search-engine

新闻搜索引擎
http://news.bitjoy.net/
432 stars 128 forks source link

无法进行任何搜索,网页都跳至Internal Server Error #8

Open Plugless opened 3 years ago

Plugless commented 3 years ago

代码完全没动,新闻也没有更新,直接运行main.py后,可正常访问 http://127.0.0.1:5000/,但是进行搜索就会跳转至Internal Server Error。我借同学的电脑运行也是同样的问题,这该怎么解决?main.py运行报错如下:

127.0.0.1 - - [11/Oct/2021 21:58:52] "GET / HTTP/1.1" 200 - search error [2021-10-11 21:58:54,831] ERROR in app: Exception on /search/ [POST] Traceback (most recent call last): File "C:\Users\15992\Desktop\newsmaster\venv\lib\site-packages\flask\app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "C:\Users\15992\Desktop\newsmaster\venv\lib\site-packages\flask\app.py", line 1519, in full_dispatch_request return self.finalize_request(rv) File "C:\Users\15992\Desktop\newsmaster\venv\lib\site-packages\flask\app.py", line 1538, in finalize_request response = self.make_response(rv) File "C:\Users\15992\Desktop\newsmaster\venv\lib\site-packages\flask\app.py", line 1701, in make_response raise TypeError( TypeError: The view function for 'search' did not return a valid response. The function either returned None or ended without a return statement. 127.0.0.1 - - [11/Oct/2021 21:58:54] "POST /search/ HTTP/1.1" 500 -

mogu134 commented 2 years ago

我的也是,请问老哥解决了吗

Plugless commented 2 years ago

解决了,把main.py里的try except都注释了。

mogu134 commented 2 years ago

解决了,把main.py里的try except都注释了。 好的,感谢

mogu134 commented 2 years ago

解决了,把main.py里的try except都注释了。

不行欸,还是Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Maxwell-ZT commented 2 years ago

请问解决了吗

mogu134 commented 2 years ago

请问解决了吗

没有

wangchaojfj commented 2 years ago

把main.py里search()函数的print(time.clock())注释掉试试看

Nomination-NRB commented 1 year ago

有用 感谢!