Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Request error cannot be properly reported

未关闭
#461 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
api, backend

调研方向

从 app/Service.py 中的 call 方法、traceback 中显示的 store_status 路径以及 exceptions.py:45 中的日志记录位置开始。在报告的 Python 2.7 设置中尝试重现请求失败,然后验证错误报告能够完成,且不会出现对 thread.lock 进行 pickling 时的 TypeError。

由索引模型根据 Issue 内容生成。

描述

bug

Description

My current pyWPS is unable to start up (obviously I need to fix that...) but the error handling/reporting is seemingly failing.

I inserted an extra LOGGER in this fragment of code from the call method in app/Service.py:

                try:
                    response = None
                    if wps_request.operation == 'getcapabilities':
                        response = self.get_capabilities(wps_request, request_u$
                        response._update_status(WPS_STATUS.SUCCEEDED, u'', 100)

                    elif wps_request.operation == 'describeprocess':
                        response = self.describe(wps_request, request_uuid, wps$
                        response._update_status(WPS_STATUS.SUCCEEDED, u'', 100)

                    elif wps_request.operation == 'execute':
                        response = self.execute(
                            wps_request.identifier,
                            wps_request,
                            request_uuid
                        )
                    return response
                except Exception as e:
                    LOGGER.exception(e)

and now have the following stack trace:

[2019-03-27 07:36:49,813]      ERROR [exceptions.py:45] Exception: code: 500, locator: No applicable error code, please check error log., description: 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0.0-py2.7.egg/pywps/app/Service.py", line 332, in call
    store_status(request_uuid, WPS_STATUS.FAILED, u'Request rejected due to exception', 100)
TypeError: can't pickle thread.lock objects

It seems there needs to be an improvement to the way that store_status works?

Environment

  • operating system:
  • Python version: 2.7
  • PyWPS version: 4.0.0
  • source/distribution
  • git clone
  • Debian
  • PyPI
  • zip/tar.gz
  • other (please specify):
  • web server
  • Apache/mod_wsgi
  • CGI
  • nGinx

Steps to Reproduce

Unable to provide code.

Additional Information

主要语言
Python
星标
186
派生
117
平均合并
11 天 20 小时
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

geopython/pywps 的其他 Issue

查看 geopython/pywps 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。