antoinercbs / tesla-synth-web-player

A web MIDI player specifically designed for the MMMZZZZ's Syntherrupter (Tesla Coil controller)
Mozilla Public License 2.0
4 stars 0 forks source link

500 error on editing a sysex command #3

Open MadsBarnkob opened 2 years ago

MadsBarnkob commented 2 years ago

Describe the bug [2022-05-31 19:44:41,624] ERROR in app: Exception on /api/translate-sysex [POST] Traceback (most recent call last): File "C:\Users\madsb\AppData\Roaming\Python\Python310\site-packages\flask\app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "C:\Users\madsb\AppData\Roaming\Python\Python310\site-packages\flask\app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Users\madsb\AppData\Roaming\Python\Python310\site-packages\flask_cors\extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(*args, kwargs))) File "C:\Users\madsb\AppData\Roaming\Python\Python310\site-packages\flask\app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "C:\Users\madsb\AppData\Roaming\Python\Python310\site-packages\flask\app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "C:\teslasynthplayer\app.py", line 83, in translate_sysex output = output[output.index('Out: ')+5:len(output)-1] ValueError: substring not found 127.0.0.1 - - [31/May/2022 19:44:41] "POST /api/translate-sysex HTTP/1.1" 500 -

To Reproduce Steps to reproduce the behavior:

  1. Install on windows 10
  2. Run app
  3. Upload a MIDI file
  4. Try to edit the sysex command line. The edit line opens, but pressing the pencil throws a 500 Error popup.
antoinercbs commented 2 years ago

Hi Mads,

Sorry for this issue. I think you refer to the windows version. I indeed forgot to include Syfoh when building the archive ^_^' It should now work properly on the release beta0.1.3.

If you refer to the python version. This may be because you typed a wrong command that fails the syfoh compilation. Indeed, when you modify a syfoh command, the frontend calls the backend that run syfoh as if the syfoh script was called in the terminal. The syfoh terminal output is then parsed to extract the binary sysex command and return it to the frontend. It is this parsing that seems to fail.

Best,

Antoine