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

Long error messages are cut off #544

Closed
rly opened this issue Dec 19, 2023 · 0 comments · Fixed by #546
Closed

Long error messages are cut off #544

rly opened this issue Dec 19, 2023 · 0 comments · Fixed by #546
Labels
bug Something isn't working

Comments

@rly
Copy link
Collaborator

rly commented Dec 19, 2023

Describe the issue

When I specify the wrong folder structure for the OpenEphysRecordingInterface, I get an error message that is not helpful and appears to be cut off.

To Reproduce
Steps that leads to the issue:

I have selected the OpenEphysRecordingInterface, chose not to Locate Data Programmatically, entered Subject Details, and then:
On the Source Data page, I selected a Folder Path and clicked the "Request Metadata Schema" button.

I got a red popup error that says "Unable to identify the OpenEphys folder structure! Please check that your folder_path' contains sub-folders of the following form" but does not tell me the form... (see screenshot below)

It looks like the red box has a max height and the text is being cut off.

In the Developer Tools, I see this error which has the full error message.

[main-process]: [2023-12-19 15:10:32,107] ERROR in app: Exception on /neuroconv/metadata [POST]
Traceback (most recent call last):
  File "neuroconv/datainterfaces/ecephys/openephys/openephysbinarydatainterface.py", line 70, in __init__
    _open_with_pyopenephys(folder_path=folder_path)
  File "neuroconv/datainterfaces/ecephys/openephys/openephysbinarydatainterface.py", line 18, in _open_with_pyopenephys
    pyopenephys_file = pyopenephys.File(foldername=folder_path)
  File "pyopenephys/core.py", line 194, in __init__
Exception: Only 'binary' and 'openephys' format are supported by pyopenephys

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "flask/app.py", line 1484, in full_dispatch_request
  File "flask/app.py", line 1469, in dispatch_request
  File "flask_restx/api.py", line 404, in wrapper
  File "flask/views.py", line 109, in view
  File "flask_restx/resource.py", line 46, in dispatch_request
  File "apis/neuroconv.py", line 84, in post
  File "manageNeuroconv/manage_neuroconv.py", line 254, in get_metadata_schema
  File "manageNeuroconv/manage_neuroconv.py", line 217, in instantiate_custom_converter
  File "neuroconv/nwbconverter.py", line 65, in __init__
    self.data_interface_objects = {
  File "neuroconv/nwbconverter.py", line 66, in <dictcomp>
    name: data_interface(**source_data[name])
  File "neuroconv/datainterfaces/ecephys/openephys/openephysdatainterface.py", line 47, in __new__
    return OpenEphysBinaryRecordingInterface(
  File "neuroconv/datainterfaces/ecephys/openephys/openephysbinarydatainterface.py", line 79, in __init__
    raise ValueError(
ValueError: Unable to identify the OpenEphys folder structure! Please check that your `folder_path` contains sub-folders of the following form: 'experiment<index>' -> 'recording<index>' -> 'continuous'.

Expected behavior
I expected to see the full error message in the popup to guide corrective action.

Screenshots
Screenshot 2023-12-19 at 3 13 19 PM

Operating system used:

  • OS: Mac arm64 (M1)
@rly rly added the bug Something isn't working label Dec 19, 2023
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

Successfully merging a pull request may close this issue.

1 participant