carboneio / carbone-sdk-python Goto Github PK
View Code? Open in Web Editor NEWThe Python SDK to use Carbone Render easily
Home Page: https://carbone.io
License: Apache License 2.0
The Python SDK to use Carbone Render easily
Home Page: https://carbone.io
License: Apache License 2.0
URL is hardcoded to hit carbone.io
Hi,
I'm going to try the carbone-sdk-python in my server, but I'm confused about the part "ACCESS-TOKEN".
Suppose I'm using Cabone in my server, why I still have to set up the ACCESS-TOKEN?
I am attempting to use the Carbone Python SDK to generate a report.
When I call csdk.render() with a valid template and valid JSON, it throws an error:
File "/Users/mariekalb/.local/share/virtualenvs/generate-report-pMg8lfbh/lib/python3.10/site-packages/carbone_sdk/carbone_sdk.py", line 109, in render
raise Exception('Carbone SDK render error: ' + resp['error'])
Exception: Carbone SDK render error: SyntaxError: Unexpected token " in JSON at position 0
I have double checked that the JSON is valid and have tried two different methods of passing in the JSON -- loading from a file, passing in a variable that contains the JSON. Neither of them work.
def render(self, file_or_template_id = None, json_data = None, payload = ""):
if file_or_template_id is None:
raise ValueError('Carbone SDK render error: argument is missing: file_or_template_id')
if file_or_template_id is None:
raise ValueError('Carbone SDK render error: argument is missing: json_data')
Should be checking json_data
for the second check
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.