I managed to upload the file to WHG (as tsv, I just changed this to text because github doesn't let me upload tsv's here):
someplaces-csv.txt
However uploading to Mehdie fails with this notice:
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/utils.py" in _execute
return self.cursor.execute(sql, params)
The above exception (duplicate key value violates unique constraint "dataset_file_pkey"
DETAIL: Key (id)=(222) already exists.
) was the direct cause of the following exception:
File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/exception.py" in inner
response = get_response(request)
File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/base.py" in _get_response
I managed to upload the file to WHG (as tsv, I just changed this to text because github doesn't let me upload tsv's here): someplaces-csv.txt However uploading to Mehdie fails with this notice:
Environment:
Request Method: POST Request URL: https://tool.mehdie.org/datasets/create/
Django Version: 2.2.28 Python Version: 3.9.2 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.gis', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.staticfiles', 'allauth', 'allauth.account', 'allauth.socialaccount', 'bootstrap_modal_forms', 'captcha', 'celery_progress', 'django_celery_results', 'django_extensions', 'django_filters', 'django_resized', 'django_tables2', 'djgeojson', 'fontawesome', 'guardian', 'leaflet', 'mathfilters', 'multiselectfield', 'rest_framework', 'rest_framework.authtoken', 'rest_framework_datatables', 'rest_framework_gis', 'tinymce', 'accounts.apps.AccountsConfig', 'api.apps.ApiConfig', 'areas.apps.AreasConfig', 'collection.apps.CollectionConfig', 'datasets.apps.DatasetsConfig', 'elastic.apps.ElasticConfig', 'main.apps.MainConfig', 'places.apps.PlacesConfig', 'remote.apps.RemoteConfig', 'resources.apps.ResourcesConfig', 'search.apps.SearchConfig', 'traces.apps.TracesConfig'] Installed Middleware: ['django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.security.SecurityMiddleware']
Traceback:
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/utils.py" in _execute
The above exception (duplicate key value violates unique constraint "dataset_file_pkey" DETAIL: Key (id)=(222) already exists. ) was the direct cause of the following exception:
File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/exception.py" in inner
File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.9/dist-packages/sentry_sdk/integrations/django/views.py" in sentry_wrapped_callback
File "/usr/local/lib/python3.9/dist-packages/django/views/generic/base.py" in view
File "/usr/local/lib/python3.9/dist-packages/django/contrib/auth/mixins.py" in dispatch
File "/usr/local/lib/python3.9/dist-packages/django/views/generic/base.py" in dispatch
File "/usr/local/lib/python3.9/dist-packages/django/views/generic/edit.py" in post
File "/usr/local/lib/python3.9/dist-packages/django/views/generic/edit.py" in post
File "/usr/lib/python3.9/contextlib.py" in inner
File "/home/macbookpro/whgazetteer-mehdie/datasets/views.py" in form_valid
File "/usr/local/lib/python3.9/dist-packages/django/db/models/manager.py" in manager_method
File "/usr/local/lib/python3.9/dist-packages/django/db/models/query.py" in create
File "/usr/local/lib/python3.9/dist-packages/django/db/models/base.py" in save
File "/usr/local/lib/python3.9/dist-packages/django/db/models/base.py" in save_base
File "/usr/local/lib/python3.9/dist-packages/django/db/models/base.py" in _save_table
File "/usr/local/lib/python3.9/dist-packages/django/db/models/base.py" in _do_insert
File "/usr/local/lib/python3.9/dist-packages/django/db/models/manager.py" in manager_method
File "/usr/local/lib/python3.9/dist-packages/django/db/models/query.py" in _insert
File "/usr/local/lib/python3.9/dist-packages/django/db/models/sql/compiler.py" in execute_sql
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/utils.py" in execute
File "/usr/local/lib/python3.9/dist-packages/sentry_sdk/integrations/django/init.py" in execute
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/utils.py" in execute
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/utils.py" in _execute_with_wrappers
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/utils.py" in _execute
File "/usr/local/lib/python3.9/dist-packages/django/db/utils.py" in exit
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/utils.py" in _execute
Exception Type: IntegrityError at /datasets/create/ Exception Value: duplicate key value violates unique constraint "dataset_file_pkey" DETAIL: Key (id)=(222) already exists.