Getting started with geocortex.reporting.client - secured portal report
I'm having trouble getting the basic examples up and running. Specifically around the run command. I thought I would upload a screen shot to see if anyone had a tip.
Thanks! - Jake
-
Hi Jake. It's possible you may be running into an issue using await at the top level of your program. I wouldn't think that would cause an "invalid syntax" error, but it's worth knowing about.
When running within an ArcGIS/Jupyter notebook, they make it possible to use a top level await, but in a regular python program you may need to do a bit of extra work.
Try putting your call to the run() inside a function and use the asyncio utility to see if that helps:
async def runReport(): await run(...) asyncio.run(runReport())You will need to import asyncio as well in this example. For more docs on this check out https://docs.python.org/3/library/asyncio-task.html
If you are still having issues feel free to submit an issue over at https://github.com/geocortex/vertigis-reporting-client-py as well. A code sample would be very helpful!
Good luck!
0 -
Jake, did this work for you at all? I am still having similar issues. I find the asyncio.run only works in 3.7 or greater.
0 -
Yep. had to switch my authentication but we got it running. thanks again @Ian Schmitz I am running 3.6.9?
https://github.com/geocortex/vertigis-reporting-client-py/issues/8
0 -
...the report has to be shared with the organization BTW. To the best of my knowledge the new "...portal/sharing/oauth2/token" service takes in a client_id you define in Portal which doesn't have group permissions. So any report would have to be shared at org level and not secured to group
0 -
So you had to be running OAuth2 for this to work?
0 -
yeah, that's what @Ian Schmitz? suggested
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
6 commentaires