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

Export dataset error - maximum recursion depth #1679

Open
tchr28 opened this issue Feb 8, 2024 · 6 comments
Open

Export dataset error - maximum recursion depth #1679

tchr28 opened this issue Feb 8, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@tchr28
Copy link

tchr28 commented Feb 8, 2024

Exporting the results of screening as .CSV results in an error: "Failed to export the csv dataset. maximum recursion depth exceeded while calling a Python object Please try again."
Trying in .XLSX results in: "Failed to export the xlsx dataset. maximum recursion depth exceeded while calling a Python object Please try again."

This happened for multiple screening datasets on the same machine (Win11 Pro, 23H2) using ASReview v1.5 in Opera

The code returns:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\asreview\webapp\authentication\decorators.py", line 40, in decorated_function
return f(project, *args, **kwargs)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\asreview\webapp\api\projects.py", line 1233, in api_export_dataset
raise Exception(f"Failed to export the {file_format} dataset. {err}")
Exception: Failed to export the xlsx dataset. maximum recursion depth exceeded while calling a Python object
ERROR:root:Failed to export the xlsx dataset. maximum recursion depth exceeded while calling a Python object
127.0.0.1 - - [2024-02-08 09:44:46] "GET /api/projects/880f7806e23246fc87335f0fb0f66885/export_dataset?dataset_label=all&file_format=xlsx HTTP/1.1" 500 346 0.063211
ERROR:asreview.webapp.app:Exception on /api/projects/880f7806e23246fc87335f0fb0f66885/export_dataset [GET]
Traceback (most recent call last):
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\asreview\webapp\api\projects.py", line 1218, in api_export_dataset
as_data.to_file(
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\asreview\data\base.py", line 431, in to_file
df = self.to_dataframe(
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\asreview\data\base.py", line 491, in to_dataframe
.replace(LABEL_NA, None).astype("Int64")
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\util_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\series.py", line 5380, in replace
return super().replace(
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\util_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\generic.py", line 7280, in replace
new_data = self._mgr.replace(
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\managers.py", line 467, in replace
return self.apply(
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\managers.py", line 347, in apply
applied = getattr(b, f)(**kwargs)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\blocks.py", line 612, in replace
return blk.replace(
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\blocks.py", line 612, in replace
return blk.replace(
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\blocks.py", line 612, in replace
return blk.replace(
[Previous line repeated 942 more times]
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\blocks.py", line 611, in replace
blk = self.coerce_to_target_dtype(value)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\blocks.py", line 450, in coerce_to_target_dtype
return self.astype(new_dtype, copy=False)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\internals\blocks.py", line 526, in astype
new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\dtypes\astype.py", line 299, in astype_array_safe
new_values = astype_array(values, dtype, copy=copy)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\dtypes\astype.py", line 217, in astype_array
if is_datetime64tz_dtype(dtype) and is_datetime64_dtype(values.dtype):
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\dtypes\common.py", line 390, in is_datetime64tz_dtype
return DatetimeTZDtype.is_dtype(arr_or_dtype)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\dtypes\base.py", line 312, in is_dtype
if isinstance(dtype, (ABCSeries, ABCIndex, ABCDataFrame, np.dtype)):
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\dtypes\generic.py", line 47, in _instancecheck
return _check(inst) and not isinstance(inst, type)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\dtypes\generic.py", line 41, in _check
return getattr(inst, attr, "_typ") in comp
RecursionError: maximum recursion depth exceeded while calling a Python object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask\app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\asreview\webapp\authentication\decorators.py", line 40, in decorated_function
return f(project, *args, **kwargs)
File "C:\Users\TimChristen\AppData\Local\Programs\Python\Python310\lib\site-packages\asreview\webapp\api\projects.py", line 1233, in api_export_dataset
raise Exception(f"Failed to export the {file_format} dataset. {err}")
Exception: Failed to export the xlsx dataset. maximum recursion depth exceeded while calling a Python object
ERROR:root:Failed to export the xlsx dataset. maximum recursion depth exceeded while calling a Python object
127.0.0.1 - - [2024-02-08 09:44:50] "GET /api/projects/880f7806e23246fc87335f0fb0f66885/export_dataset?dataset_label=all&file_format=xlsx HTTP/1.1" 500 346 0.072702

@tchr28 tchr28 added the bug Something isn't working label Feb 8, 2024
@J535D165
Copy link
Member

J535D165 commented Feb 8, 2024

Sorry for inconviencence. Can you export your project and send it to asreview@uu.nl?

@tchr28
Copy link
Author

tchr28 commented Feb 8, 2024

I will. Thanks! Additional info: the same also happens in Chrome.

@tchr28
Copy link
Author

tchr28 commented Mar 26, 2024

Hi @J535D165,
did you happen to find out what the problem is in this bug? Uninstall and Install again did not work.

@Rensvandeschoot
Copy link
Member

@tchr28
Copy link
Author

tchr28 commented Mar 30, 2024 via email

@tchr28
Copy link
Author

tchr28 commented Apr 3, 2024 via email

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
None yet
Development

No branches or pull requests

3 participants