Python_RuntimeError问题的解决

implement_array_function method already has a docstring

本人开发使用的是apache2.4,python3.6和django,在配置Apache的时候,内外网同时访问就会报错,
只能有一方访问,

Traceback (most recent call last):\r, referer: http://***/***.html
File "c:\\programdata\\anaconda3\\lib\\site-packages\\django\\core\\handlers\\exception.py", line 34, in inner\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]     response = get_response(request)\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052] [  File "c:\\programdata\\anaconda3\\lib\\site-packages\\django\\utils\\deprecation.py", line 90, in __call__\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]    response = self.process_request(request)\r, referer:  http://***/***.html
[wsgi:error]   File "c:\\programdata\\anaconda3\\lib\\site-packages\\django\\middleware\\common.py", line 52, in process_request\r, referer:  http://***/***.html
[wsgi:error]  if self.should_redirect_with_slash(request):\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]   File "c:\\programdata\\anaconda3\\lib\\site-packages\\django\\middleware\\common.py", line 70, in should_redirect_with_slash\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]    not is_valid_path(request.path_info, urlconf) and\r, referer: http://***/***.html
[wsgi:error] [pid 112308:tid 1052]   File "c:\\programdata\\anaconda3\\lib\\site-packages\\django\\urls\\base.py", line 157, in is_valid_path\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]    resolve(path, urlconf)\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]   File "c:\\programdata\\anaconda3\\lib\\site-packages\\django\\urls\\base.py", line 24, in resolve\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]   patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]   File "c:\\programdata\\anaconda3\\lib\\site-packages\\django\\utils\\functional.py", line 37, in __get__\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]     res = instance.__dict__[self.name] = self.func(instance)\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]  File "c:\\programdata\\anaconda3\\lib\\site-packages\\django\\urls\\resolvers.py", line 526, in urlconf_module\r, referer:  http://***/***.html
........................................
[wsgi:error] [pid 112308:tid 1052    from . import core\r, referer:   http://***/***.html
[wsgi:error] [pid 112308:tid 1052]   File "c:\\programdata\\anaconda3\\lib\\site-packages\\numpy\\core\\__init__.py", line 40, in <module>\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]    from . import multiarray\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]   File "c:\\programdata\\anaconda3\\lib\\site-packages\\numpy\\core\\multiarray.py", line 12, in <module>\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]    from . import overrides\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]   File "c:\\programdata\\anaconda3\\lib\\site-packages\\numpy\\core\\overrides.py", line 46, in <module>\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052]    """)\r, referer:  http://***/***.html
[wsgi:error] [pid 112308:tid 1052] RuntimeError: implement_array_function method already has a docstring, referer:  http://***/***.html

解决办法:

在Apache2.4的目录找到conf目录下找到httpd.conf在这里插入图片描述
在文件mog_wsgi j添加 一句话:WSGIApplicationGroup %{GLOBAL}

#添加mod_wsgi.so模块,这三行是上面命令行中显示出来的
LoadFile "c:/******/python36.dll"
LoadModule wsgi_module "c:/*****/mod_wsgi/server/mod_wsgi.cp36-win_amd64.pyd"
WSGIPythonHome "c:/*****/anaconda3"
//加入这句话,可以多接口访问
WSGIApplicationGroup %{GLOBAL} 

如此问题解决!
参考链接,runtime error

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值