AIT-GUI icon indicating copy to clipboard operation
AIT-GUI copied to clipboard

AttributeError: 'AITDBResult' object has no attribute 'get_points'

Open rachaelacollins opened this issue 2 years ago • 4 comments

Description

 Traceback (most recent call last):
   File "/home/ait/.local/lib/python3.10/site-packages/bottle.py", line 876, in _handle
     return route.call(**args)
   File "/home/ait/.local/lib/python3.10/site-packages/bottle.py", line 1756, in wrapper
     rv = callback(*a, **ka)
   File "/home/ait/.local/lib/python3.10/site-packages/ait/gui/__init__.py", line 1286, in handle_playback_range_get
    packets = list(playback.dbconn.query("SHOW MEASUREMENTS").get_points())
 AttributeError: 'AITDBResult' object has no attribute 'get_points'

Versions

  • ait-core: 2.5.0
  • ait-gui: 2.4.1
  • influxdb: 5.3.1

Fix

Add .results before all uses of .get_points() to return ResultSet, e.g.:

list(playback.dbconn.query("SHOW MEASUREMENTS").results.get_points())

rachaelacollins avatar Nov 08 '23 23:11 rachaelacollins

Happy to directly contribute the fix. Let me know if following the contributing README is sufficient!

rachaelacollins avatar Nov 08 '23 23:11 rachaelacollins

@rachaelacollins, sorry, I have no clue how I missed the notification emails for your ticket and comment. Yes, please feel free to contribute updates for this. The README should cover everything but if you run into issues let us know!

MJJoyce avatar Nov 16 '23 00:11 MJJoyce

Hey @MJJoyce, thank you for the response. Unfortunately, I don't have the appropriate permissions to push the fix.

rachaelacollins avatar Nov 16 '23 23:11 rachaelacollins

Hey @rachaelacollins, if you're willing to push the fix please just follow the usual GitHub pull request approach for a repo where you don't have write perms. You'll need to fork it, push changes to a branch, and then generate the pull request.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

MJJoyce avatar Nov 29 '23 20:11 MJJoyce