tableau / rest-api-samples

Samples for the Tableau REST API
MIT License
378 stars 268 forks source link

New to these APIs cannot run because of missing VERSION package #77

Closed CAP-JForlow closed 1 year ago

CAP-JForlow commented 1 year ago

Hi -- New to Python, been programming in other languages for years... I am trying to run the Python script to move workbooks. I have Python 3.10, but I am getting a message about VERSION not being defined (see below). I tried doing a Pip install VERSION but that did not work.

Any ideas on how I can fix this? Thanks John

  1. Signing in to both sites to obtain authentication tokens Traceback (most recent call last): File "D:\TOL - Scripts\Data Sources\move_datasource_server.py", line 415, in main() File "D:\TOL - Scripts\Data Sources\move_datasource_server.py", line 382, in main source_auth_token, source_site_id, source_user_id = sign_in(source_server, source_username, source_password, source_site) File "D:\TOL - Scripts\Data Sources\move_datasource_server.py", line 138, in sign_in url = server + "/api/{0}/auth/signin".format(VERSION) NameError: name 'VERSION' is not defined
jacalata commented 1 year ago

VERSION is imported from the file version.py, which should be in the same folder as the sample scripts. If not, you can create a local copy of the file from here - https://github.com/tableau/rest-api-samples/blob/master/python/version.py

CAP-JForlow commented 1 year ago

Thank you for your help. I grabbed the move_workbook_server.py file only, not realizing that the whole set were interconnected.

John

From: Jac @.> Sent: Monday, December 12, 2022 1:27 PM To: tableau/rest-api-samples @.> Cc: John Forlow (s) @.>; Author @.> Subject: Re: [tableau/rest-api-samples] New to these APIs cannot run because of missing VERSION package (Issue #77)

VERSION is imported from the file version. py, which should be in the same folder as the sample scripts. If not, you can create a local copy of the file from here - https: //github. com/tableau/rest-api-samples/blob/master/python/version. py ‍ ‍ ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. This banner is provided by CAP IS ZjQcmQRYFpfptBannerEnd

VERSION is imported from the file version.py, which should be in the same folder as the sample scripts. If not, you can create a local copy of the file from here - https://github.com/tableau/rest-api-samples/blob/master/python/version.pyhttps://urldefense.com/v3/__https:/github.com/tableau/rest-api-samples/blob/master/python/version.py__;!!Nge-QFtCGiqLqA!CKwCtcKYHm7M3iOuAHg2yBf_0uIRJEsUftdCXv4Qs0E0pab7Pkpgw04wfKLORRLF0x4bNZE1u9JPi-2BZ3Tk3g$

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/tableau/rest-api-samples/issues/77*issuecomment-1347164160__;Iw!!Nge-QFtCGiqLqA!CKwCtcKYHm7M3iOuAHg2yBf_0uIRJEsUftdCXv4Qs0E0pab7Pkpgw04wfKLORRLF0x4bNZE1u9JPi-2t7mIPVg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AO2HQ2PQGU52YT47QJXHNI3WM5367ANCNFSM6AAAAAAS4FMIIM__;!!Nge-QFtCGiqLqA!CKwCtcKYHm7M3iOuAHg2yBf_0uIRJEsUftdCXv4Qs0E0pab7Pkpgw04wfKLORRLF0x4bNZE1u9JPi-3SC9N_5Q$. You are receiving this because you authored the thread.Message ID: @.***>

jacalata commented 1 year ago

I'm assuming you got it working - let us know if not!