Module error for "sdk_exceptions"

Getting error while running api testing to generate pdf of dashboard.

19091c39-bd65-4f6e-9976-04665555ca05.png
Solved Solved
0 3 185
1 ACCEPTED SOLUTION

Hello @manishkamble19 ,

You could either copy the file sdk_exceptions.py from https://github.com/looker-open-source/sdk-codegen/blob/main/examples/python/sdk_exceptions.py and save it to the folder containing the your scrip for down_dashboard_pdf.py

This file is for custom error handling, you could replace all the lines such as “sdk_exceptions.ArgumentError” (sdk_exceptions . __) with simple “Exception” if you do not require the custom error handling.

Hope this helps!

View solution in original post

3 REPLIES 3

Hello @manishkamble19 ,

You could either copy the file sdk_exceptions.py from https://github.com/looker-open-source/sdk-codegen/blob/main/examples/python/sdk_exceptions.py and save it to the folder containing the your scrip for down_dashboard_pdf.py

This file is for custom error handling, you could replace all the lines such as “sdk_exceptions.ArgumentError” (sdk_exceptions . __) with simple “Exception” if you do not require the custom error handling.

Hope this helps!

Hello @manishkamble19 ,

You could either copy the file sdk_exceptions.py from https://github.com/looker-open-source/sdk-codegen/blob/main/examples/python/sdk_exceptions.py and save it to the folder containing the your scrip for down_dashboard_pdf.py

This file is for custom error handling, you could replace all the lines such as “sdk_exceptions.ArgumentError” (sdk_exceptions . __) with simple “Exception” if you do not require the custom error handling.

Hope this helps!

Ok Thanks Ranjit I will check on this. Also if you familiar with the looker API. I am facing some issue while passing filters in the code. Can you help me out @Ranjit_1312 .

I wants to add some filters on dashboard which are like below image.

de1435f1-1304-4157-bd78-03746e11c535.png


But while parsing those filter values as argument in the API giving error. Any one knows how to avoid/resolve this error. Or what is the correct format to pass the filter values.

I am parsing the argument as below which is mentioned in the github API doc. 

$ python download_dashboard_pdf.py "A Test Dashboard" '{"filter1": "value1, value2", "filter2": "value3"}'

e8398b86-414f-40cd-86f6-56f08b590a5d.png