Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Move workbooks" sample doesn't work for large workbooks #28

Open
vikpos opened this issue May 30, 2018 · 2 comments
Open

"Move workbooks" sample doesn't work for large workbooks #28

vikpos opened this issue May 30, 2018 · 2 comments
Assignees
Labels
bug An existing feature in the sample is broken python specific to the python code samples

Comments

@vikpos
Copy link

vikpos commented May 30, 2018

Hi team,

I spotted an issue in this sample script:
https://github.com/tableau/rest-api-samples/blob/master/python/move_workbook_sites.py

When running it with a large workbook (over 64MB) the script fails with:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 405, in
main()
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 392, in main
workbook_content, dest_project_id)
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 299, in publish_workbook
upload_id = start_upload_session(server, site_id, auth_token)
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 173, in start_upload_session
_check_status(server_response, 201)
File "C:\Python27\Lib\site-packages\move_DS_sample.py", line 106, in _check_status
raise ApiCallError(error_message)
main.ApiCallError: 401002: Unauthorized Access - Invalid authentication credentials were provided.

I found this happens because of line 288:
upload_id = start_upload_session(server, site_id, auth_token)

the code should be:
upload_id = start_upload_session(server, auth_token, site_id)

Otherwise it uses "site id" as auth token and fails... Could you please fix?
NB: Same issue could be affecting other samples...

@aaroncarey
Copy link
Contributor

This looks like a clear-cut fix to me. Any concerns from @RussTheAerialist or @irwando ?

@alibbird
Copy link

Confirming this issue is still not resolved in the sample script

@graysonarts graysonarts removed their assignment Dec 12, 2020
@jacalata jacalata added bug An existing feature in the sample is broken python specific to the python code samples labels Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing feature in the sample is broken python specific to the python code samples
Projects
None yet
Development

No branches or pull requests

6 participants