Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rachaelacollins opened this issue Nov 8, 2023 · 4 comments

Comments

@rachaelacollins
Copy link

rachaelacollins commented Nov 8, 2023

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
Copy link
Author

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

@MJJoyce
Copy link
Member

MJJoyce commented Nov 16, 2023

@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!

@rachaelacollins
Copy link
Author

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

@MJJoyce
Copy link
Member

MJJoyce commented Nov 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants