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
I am trying to get an inference on an image using hava script in a webapp. however everytime I make the request, the yolov5 serve app shuts down. with the error below, I know I, i am not passing data in the right format, however I am not sure how to fix it, any direction?!
Unexpected exception in main. main_name=main, stack=[
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/supervisely_lib/function_wrapper.py", line 15, in main_wrapper
main_func(*args, **kwargs)
File "/sessions/325348/repo/supervisely/serve/src/sly_serve.py", line 204, in main
my_app.run(initial_events=[{"command": "preprocess"}])
File "/usr/local/lib/python3.8/dist-packages/supervisely_lib/app/app_service.py", line 286, in run
raise self._error
File "/usr/local/lib/python3.8/dist-packages/supervisely_lib/app/app_service.py", line 191, in handle_message_sync
self.callbacks[command](api=user_public_api,
File "/usr/local/lib/python3.8/dist-packages/supervisely_lib/decorators/profile.py", line 11, in wrapper_timer
value = func(*args, **kwargs)
File "/sessions/325348/repo/supervisely/serve/src/sly_serve.py", line 113, in inference_image_url
image_url = state["image_url"]
TypeError: 'NoneType' object is not subscriptable
Additional context
my ret is formatted as such:
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var url = "https://app.supervise.ly/public/api/v3/tasks.request.direct";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("x-api-key", "key goes here");
xhr.setRequestHeader('Content-Type', 'application/json');
image_url = "https://i.imgur.com/tEkCb69.jpg"
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.status);
console.log(xhr.responseText);
}};
const json = {
"taskId": 325348,
"command": "inference_image_url",
"data": {
"image_id": image_url,
},
};
xhr.send(JSON.stringify(json));
The text was updated successfully, but these errors were encountered:
If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.
If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.
Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:
$ pip install -r requirements.txt
Environments
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.
❔Question
I am trying to get an inference on an image using hava script in a webapp. however everytime I make the request, the yolov5 serve app shuts down. with the error below, I know I, i am not passing data in the right format, however I am not sure how to fix it, any direction?!
Additional context
my ret is formatted as such:
The text was updated successfully, but these errors were encountered: