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

Unable to export labeled dataset (500 Error) #1464

Closed
garyhsu29 opened this issue Aug 3, 2021 · 0 comments · Fixed by #1799
Closed

Unable to export labeled dataset (500 Error) #1464

garyhsu29 opened this issue Aug 3, 2021 · 0 comments · Fixed by #1799
Labels
bug Something isn't working
Projects

Comments

@garyhsu29
Copy link

garyhsu29 commented Aug 3, 2021

How to reproduce the behaviour:

Upload 3000 records for named entity recognition, and export the data, it gave me a 500 Error.

Your Environment

  • Operating System: CentOS Linux 7 (Core)
  • Python Version Used: 3.6.8
  • When you install doccano: July 16, 2021
  • How did you install doccano (Heroku button etc): Shell

Error message:
Environment:

Request Method: GET

Django Version: 3.2.5
Python Version: 3.6.8
Installed Applications:

['whitenoise.runserver_nostatic',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'api.apps.ApiConfig',
 'rest_framework',
 'rest_framework.authtoken',
 'django_filters',
 'social_django',
 'polymorphic',
 'corsheaders',
 'drf_yasg',
 'dj_rest_auth',
 'django_celery_results',
 'django_drf_filepond']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'social_django.middleware.SocialAuthExceptionMiddleware',
 'corsheaders.middleware.CorsMiddleware']
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/backend/api/views/export_dataset.py", line 34, in get
    return FileResponse(open(filename, mode='rb'), as_attachment=True)

Exception Type: TypeError at /v1/projects/2/download
Exception Value: expected str, bytes or os.PathLike object, not OperationalError
https://www.loom.com/share/1e646155380a4eb08a1b0590e5a62f55

@Hironsan Hironsan added the bug Something isn't working label Nov 12, 2021
@Hironsan Hironsan added this to To do in v1.7.0 Mar 22, 2022
@Hironsan Hironsan moved this from To do to In progress in v1.7.0 Apr 13, 2022
v1.7.0 automation moved this from In progress to Done Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
v1.7.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants