Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Permission denied when uploading file to bucket in Google Cloud Storage via Python script

Danial_Nawab
7 - Meteor

Environment Details:
Alteryx Server 2022.1

Alteryx Designer 2022.1

Python Version: 3.10.9

 

Problem Statement 1: I am trying to upload a file to a bucket in Google Cloud Storage via a Python script that I wrote and implemented in both the local and Alteryx Server environments but it keeps failing and prompts the following output:

[Errno 13] Permission denied: 'C:\\Users\\UNAWADA\\Downloads'
File upload failed.

Please refer to these images labelled as the following for further reference :

  1. (In Alteryx Server Environment) Permission denied when uploading file to bucket
  2. (In Local Environment) Permission denied when uploading file to bucket

 

Problem Statement 2: I incorporated a few more lines in the existing Python script to execute the code with administrative privileges but the Kernel dies as soon as I run the script. I saved the Python script and tried to execute it through the command prompt but it says "Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases." Please note that I have manually created an environment variable for Python and pointed it to the location where Python is installed.

Mnually created environment variable for Python.png

 

Please refer to these images labelled as the following for further reference :

  1. (In Local Environment) Script with administrative privileges
  2. Cmd wont execute the script
  3. Kernel dies when ran with administrative privileges
  4. Kernel dies when ran with administrative privileges

 

I would like to ask the community what might be the cause of this.

Is the file failing to upload because of some administrative restrictions from corporate IT? Why is the environment variable for Python not automatically created after installing it or is this also because of some restrictions placed by IT department?

 

 

 

Thank you for your time and responses. 

1 REPLY 1
hlipperjohn
5 - Atom

The error message "python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from settings" typically occurs when you try to run a Python script, but Windows is unable to locate the Python interpreter. To fix this, you can either install Python from the Microsoft Store by running it without any arguments (just type "python" in the command prompt and follow the installation prompts) or you can disable this specific shortcut in the Windows settings if you don't intend to use it. Installing Python from the Microsoft Store ensures that the Python interpreter is readily available for running scripts and applications on your system.