question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

json api call returns empty

See original GitHub issue

I’m having an issue using the API. I have a 2D image which has been labelled. If I go to the API in chrome (localhost:3000/api/json/(file_url)) it displays all the information for the labeling of that image. However, I can’t get that to reflect in my python download script.

data = request.get('localhost:3000/api/json/(file_url)').json()
print('data = {}'.format(data))

this returns

data = {}

instead of what I would assume to be a dictionary with all the same information that is displayed in chrome.

as a followup, how could I then use API calls to then download the actual image with mask. I know while labeling an individual file I can press the download button in the upper right corner to download the actual image file, but I’d like to be able to do this as a batch download after labeling a lot of images.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mteastepp2commented, Jun 18, 2020

well that’s unfortunate. Thanks for helping me though, I appreciate it! I’ll keep digging around. I might just use the python curl library instead of the requests library

0reactions
dmandriolicommented, Jun 19, 2020

You’re welcome. As a freelance developer I can provide professional support and custom development around this tool, saving your and your colleagues valuable time if needed 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web API returns empty json array - Stack Overflow
The id and name need to be public and properties. As of 3.0 System.Text.Json.JsonSerializer does not serialize fields.
Read more >
JSON REST API response with empty list - OutSystems
I'm producing a REST API with JSON response. In case the response is emtpy, the consumers like to get the following response:.
Read more >
JSON API package queries returning empty response ... - GitHub
When querying the JSON API, the body of the response is sometimes empty (as-in b'' ). Querying the same endpoint/package after returns a...
Read more >
REST Api returns empty data in Postman - Microsoft Q&A
I am using the SharePoint REST API to get the data, but it returns the empty data in Postman. When I put the...
Read more >
NET Core 3.1 API returns empty JSON objects - Solved
.NET Core 3.1 API returns empty JSON objects – Solved ... I faced one strange issue during the migration process of .NET Core...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found