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

Fix Server Error Parsing #546

Merged
merged 4 commits into from
Dec 28, 2023
Merged

Fix Server Error Parsing #546

merged 4 commits into from
Dec 28, 2023

Conversation

garrettmflynn
Copy link
Member

fix #544

Was excluding any strings after the second (or later) colon when parsing error messages from the server.

@garrettmflynn garrettmflynn self-assigned this Dec 28, 2023
@garrettmflynn garrettmflynn changed the title Fix Error Parsing Fix Server Error Parsing Dec 28, 2023
@rly
Copy link
Collaborator

rly commented Dec 28, 2023

Thanks! That seems to work. However, now it looks like <...> is not being escaped properly.

The error message should say:

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'.

but instead shows:
image

@garrettmflynn
Copy link
Member Author

garrettmflynn commented Dec 28, 2023

I can't replicate this exact issue since I don't have the same file. I'm not splitting on those <...>, so it's odd that they aren't showing up.

How large is this file? That would be the easiest way to make sure everything is caught.

@rly
Copy link
Collaborator

rly commented Dec 28, 2023

To replicate the issue, I think you will not need the file but should be able to do the following:

  1. create a new temp folder name "temp"
  2. create a new empty or nonsense file in that folder named "continuous.dat"
  3. create a new conversion in NWB GUIDE and add the OpenEphysRecordingInterface
  4. when asked "Will you locate your files programmatically?" select No
  5. populate some subject details
  6. on the Source Data page, for your subject, under OpenEphysRecordingInterface > Folder Path, select the file chooser and select the new "temp" folder
  7. click Request Metadata Schema button to see error

@garrettmflynn
Copy link
Member Author

garrettmflynn commented Dec 28, 2023

Ah I see now. I was injecting the error into the HTML for formatting reasons, and <...> is interpreted as an invalid singleton HTML tag. I've replaced these with the proper character entities to render properly.

Copy link
Collaborator

@rly rly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my end! Thanks!

@CodyCBakerPhD CodyCBakerPhD merged commit 2b547be into main Dec 28, 2023
11 checks passed
@CodyCBakerPhD CodyCBakerPhD deleted the fix-error-parsing branch December 28, 2023 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Long error messages are cut off
3 participants