openmeteo / enhydris

A database with a web interface for the storage and management of hydro/meteorological measurements and time series
GNU Affero General Public License v3.0
18 stars 11 forks source link

Internal server error in /timeseries/data/ #305

Closed aptiko closed 4 years ago

aptiko commented 4 years ago
Internal Server Error: /timeseries/data/

ParseError at /timeseries/data/
month must be in 1..12

Request Method: GET
Request URL: https://openmeteo.org/timeseries/data/?object_id=9723
Django Version: 2.2.2
Python Executable: /opt/enhydris-openmeteo/venv/bin/python3
Python Version: 3.7.3
Python Path: ['/opt/enhydris-openmeteo', '/opt/enhydris-openmeteo', '/opt/enhydris-openmeteo/venv/bin', '/etc/opt/enhydris/openmeteo', '/opt/enhydris-openmeteo/venv/lib/python37.zip', '/opt/enhydris-openmeteo/venv/lib/python3.7', '/opt/enhydris-openmeteo/venv/lib/python3.7/lib-dynload', '/usr/lib/python3.7', '/opt/enhydris-openmeteo/venv/lib/python3.7/site-packages', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages']
Server time: Thu, 2 Apr 2020 06:36:24 +0000
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.messages',
 'django.contrib.sessions',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'django.contrib.humanize',
 'django.contrib.gis',
 'django.contrib.flatpages',
 'django.contrib.postgres',
 'rest_framework',
 'rest_framework.authtoken',
 'rest_auth',
 'bootstrap3',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'rest_auth.registration',
 'rest_captcha',
 'enhydris',
 'enhydris.api',
 'django.contrib.admin',
 'rules.apps.AutodiscoverRulesConfig',
 'parler',
 'nested_admin',
 'enhydris_synoptic',
 'enhydris_autoprocess',
 'enhydris_openhigis']
Installed Middleware:
['django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.gzip.GZipMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware']

Traceback:

File "/opt/enhydris-openmeteo/venv/lib/python3.7/site-packages/iso8601/iso8601.py" in parse_date
  211.             tzinfo=tz,

During handling of the above exception (month must be in 1..12), another exception occurred:

File "/opt/enhydris-openmeteo/venv/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/opt/enhydris-openmeteo/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "/opt/enhydris-openmeteo/venv/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/opt/enhydris-openmeteo/enhydris/views_old.py" in timeseries_data
  222.                 k = iso8601.parse_date(t[0], default_timezone=tz)

File "/opt/enhydris-openmeteo/venv/lib/python3.7/site-packages/iso8601/iso8601.py" in parse_date
  214.         raise ParseError(e)

Exception Type: ParseError at /timeseries/data/
Exception Value: month must be in 1..12
aptiko commented 4 years ago

There's no need to fix this as there's #181 pending.