Coder Social home page Coder Social logo

influxdb-dashboard-renderer's Issues

error

I'v tried to get this working but no mater what I enter I only get
{"status": "error", "message": "not all arguments were provided"}

I have Token, location, org id set as variables in the docker image

the URL I'm sending is http://192.168.0.11:5000/render?lable=House

thanks

Cannot render a dashboard

Hi!
I'm trying to use the python script in the REAMD and the server and in both caes i have the same error. My main goal is export the dashboard to make a pdf report.

Below the output of script and the server usage. Any help would be appreciated

Error in server stdout

[2021-08-06 19:58:24,233] ERROR in app: Exception on /render [POST]
Traceback (most recent call last):
File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "./server/server.py", line 87, in render
result = get_dashboard_from_request()
File "./server/server.py", line 49, in get_dashboard_from_request
d = InfluxDBDashboardView(c, dashboard_id)
File "/home/user/influxdb-dashboard-renderer/influxdb_dashboard/client.py", line 214, in init
self.name = info.name
AttributeError: 'dict' object has no attribute 'name'
127.0.0.1 - - [06/Aug/2021 19:58:24] "POST /render HTTP/1.1" 500 -

** Curl Command **

[root@server influxdb-dashboard-renderer] curl --header "Content-Type: application/json" -X POST \

--data '{^
"url": "http://10.x.x.x:8086",
"token": "token_id_created_in_influx",
"org_id": "organization_id_taken_from_about_section",
"id": "id_of_the_dashboard",
"width": 1280,
"height": 720,
"dpi": 75
}' http://127.0.0.1:5000/render

<title>500 Internal Server Error</title>

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

[root@silenox influxdb-dashboard-renderer]#

Error in script

Traceback (most recent call last):
File "influx.py", line 9, in
d = InfluxDBDashboardView.find_by_label(c, LABEL)
File "/home/user/influxdb-dashboard-renderer/influxdb_dashboard/client.py", line 250, in find_by_label
return cls(client, matches[0].id, org_id=org_id)
File "/home/user/influxdb-dashboard-renderer/influxdb_dashboard/client.py", line 214, in init
self.name = info.name
AttributeError: 'dict' object has no attribute 'name'

** Parameter **
TOKEN='token_id_created_in_influx'
ORG_ID='organization_id_taken_from_about_section'
LABEL='name_of_the_label_asociated_with_dashboard'

c = InfluxDBClient(url='http://10.x.x.x:8086', token=TOKEN, org=ORG_ID)

** Aditional note **
I found and error in script about the import. I use this:

from influxdb_dashboard import InfluxDBDashboardView, InfluxDBDashboardOutput
from influxdb_client import InfluxDBClient

Regards,
Mariano

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.