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.

Issue with retrieving nested objects

See original GitHub issue

I’m submitting a

  • bug report.
  • feature request.

Current Behaviour:

Retrieving nested objects like

{"@type": "Command", "DroneID": "1223", 
"State": {"@type": "State", "DroneID": "-1000", "Battery": "50", 
"Direction": "North", "Position": "1,1", "Status": "Active", "Speed": "100"}
} 

causes the server to crash. I guess this happened after the internal mechanism change that was done (Seggrigating nested objects at a different url location). When trying to retrieve any nested object, the server throws this error [2019-03-24 21:33:05,891] ERROR in app: Exception on /api/CommandCollection/ba49e203-7d00-42d5-92dd-c630873559d0 [GET] Traceback (most recent call last): File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask_restful/__init__.py", line 480, in wrapper resp = resource(*args, **kwargs) File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask/views.py", line 88, in view return self.dispatch_request(*args, **kwargs) File "/home/xadahiya/miniconda3/lib/python3.7/site-packages/flask_restful/__init__.py", line 595, in dispatch_request resp = meth(*args, **kwargs) File "/mnt/d/workspace/hydra/hydra-flock-demo/src/hydrus/hydrus/resources.py", line 106, in get session=get_session()) File "/mnt/d/workspace/hydra/hydra-flock-demo/src/hydrus/hydrus/data/crud.py", line 114, in get for collection in doc.collections: AttributeError: 'str' object has no attribute 'collections'

Expected Behaviour:

Nested objects should be returned properly.

Steps to reproduce:

  • Run hydra-flock-central-controller
  • add something to command collection
  • retrieve that item

Do you want to work on this issue?

NO

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
xadahiyacommented, Mar 24, 2019

I tried that but it didn’t work. Could you please try to find out what’s wrong with the demo?

0reactions
xadahiyacommented, Mar 25, 2019

Cool! @vddesai1871 please create an issue in the flock-demo repo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nested objects giving me trouble - Stack Overflow
I can display "parent" data fine, but nested objects are giving me so much trouble. I'm getting the "Objects are not valid as...
Read more >
Accessing Nested Objects in JavaScript - DEV Community ‍ ‍
Let's take this nested object as an example. const name = user.personalInfo.name; const userCity = user.
Read more >
Impossible to retrieve nested Objects with same key without ...
In the end i have developed a workaround acting in the put() method in the LinkedTreeMap source code. ... Issue is however closed...
Read more >
Accessing Nested Objects in JavaScript - HackerNoon
Let's take this nested object as an example. const name = user.personalInfo.name;const userCity = user.
Read more >
Extracting nested object with JSONExtractor, issue with ...
Hi folks,. While I was extracting a nested JSON object using the JSONExtractor, it seemed like I stumbled upon an issue. Consider the...
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