You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
let's start with the good news: THX for your code, after initial debugging it did exactly what i was looking for :)
Now the bad ones:
After solving installation problems of wxPython by running pip install attrdict3 before installing orangeshare, I've discovered further problems using Python 3.10 on ArchLinux:
When I tried to add a new device, an alert popped up saying
Error: {"message": "The browser (or proxy) sent a request that this server could not understand."}
After some initial confusion, I discovered the problem was introduced in Werkzeug's version 2.1.0 by a change of Request.get_json() now raising BadRequest Errors if ContentType not explicitly set to application/json.
Several ways to fix orangeshare exist. I've confirmed setting contentType="application/json" and using JSON.stringify for every $.post works. Also, installing Wertkzeug==2.0.3 fixes the issue, but I think explicitly setting location="form" in RequestParser.add_argument is the "most correct" fix, as is keeps your initial intent of sending FormData and as you're rewriting the server side anyway, I'd prefer not to change the JS part --> PR incoming!.
Furthermore, to prevent issues like this one introduced by 3rd party updates, I'd recommend pinning dependencies to versions known to work.
Have a good one,
Mo
The text was updated successfully, but these errors were encountered:
mofe23
added a commit
to mofe23/Orange-Share
that referenced
this issue
Oct 12, 2022
Hi,
let's start with the good news: THX for your code, after initial debugging it did exactly what i was looking for :)
Now the bad ones:
After solving installation problems of wxPython by running
pip install attrdict3
before installing orangeshare, I've discovered further problems using Python 3.10 on ArchLinux:When I tried to add a new device, an alert popped up saying
After some initial confusion, I discovered the problem was introduced in Werkzeug's version 2.1.0 by a change of
Request.get_json()
now raisingBadRequest
Errors ifContentType
not explicitly set toapplication/json
.Several ways to fix orangeshare exist. I've confirmed setting
contentType="application/json"
and usingJSON.stringify
for every$.post
works. Also, installingWertkzeug==2.0.3
fixes the issue, but I think explicitly settinglocation="form"
inRequestParser.add_argument
is the "most correct" fix, as is keeps your initial intent of sendingFormData
and as you're rewriting the server side anyway, I'd prefer not to change the JS part --> PR incoming!.Furthermore, to prevent issues like this one introduced by 3rd party updates, I'd recommend pinning dependencies to versions known to work.
Have a good one,
Mo
The text was updated successfully, but these errors were encountered: