Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetCapabilities - TypeError: list indices must be integers or slices, not str #1032

Open
1 of 8 tasks
Dubkoslove opened this issue Oct 14, 2024 · 3 comments
Open
1 of 8 tasks

Comments

@Dubkoslove
Copy link

Dubkoslove commented Oct 14, 2024

Description

Default getcapabilities use case does work.

Enpodints:

  • /csw
  • /csw?service=CSW&version=2.0.2&request=GetCapabilities

return error 500

Environment

  • operating system:
  • Python version: 3.10
  • pycsw version: 3.0
  • source/distribution
    • git clone
    • DebianGIS/UbuntuGIS
    • PyPI
    • zip/tar.gz
    • other (please specify):
  • web server
    • Apache/mod_wsgi
    • CGI
    • other (please specify):

Steps to Reproduce

Deployment on Kubernetes pod via helm chart. Used default configuration with pg database and APISO profile enabled.

Additional Information

[2024-10-14T09:16:20Z] {/usr/local/lib/python3.10/site-packages/flask/app.py:838} ERROR - Exception on /csw [GET]
Traceback (most recent call last):

File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/home/pycsw/pycsw/pycsw/wsgi_flask.py", line 264, in csw
status, headers, content = application_dispatcher(request.environ)
File "/home/pycsw/pycsw/pycsw/wsgi.py", line 84, in application_dispatcher
status, contents = csw.dispatch_wsgi()
File "/home/pycsw/pycsw/pycsw/server.py", line 248, in dispatch_wsgi
return self.dispatch()
File "/home/pycsw/pycsw/pycsw/server.py", line 567, in dispatch
self.response = self.iface.getcapabilities()
File "/home/pycsw/pycsw/pycsw/ogc/csw/csw3.py", line 395, in getcapabilities
self.parent.profiles['loaded'][prof].get_extendedcapabilities()
File "/home/pycsw/pycsw/pycsw/plugins/profiles/apiso/apiso.py", line 242, in get_extendedcapabilities
util.nspath_eval('inspire_common:StartingDate', self.inspire_namespaces)).text = str(val['begin'])
TypeError: list indices must be integers or slices, not str

@kalxas
Copy link
Member

kalxas commented Oct 14, 2024

@Dubkoslove
Copy link
Author

http://demo.pycsw.org/cite/csw?service=CSW&version=2.0.2&request=GetCapabilities

Sorry, I dont understand your comment.

My problem was that the inspire functionality raises this exception after default deployment.
I turned off the inspire, now it works.

@kalxas
Copy link
Member

kalxas commented Oct 15, 2024

Thank you for the feedback, I will try to replicate the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants