Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Error: "...File "<string>", line 1 os.environ['PATH'] = r"..." when running with Python-based Connector tool

lepome
Alteryx Alumni (Retired)
Created

Environment Details


If you observe an error message like

Error: Salesforce Input (1) File "<string>", line 1 os.environ['PATH'] = r"...

please read on to learn how to adjust the environment variables to resolve it. This can happen with any one of several Connector tools, not just the tool mentioned in the example.

 
  • Alteryx Designer 
    • All versions
  • Any python-based Connector tool
  • Requires Administrator permissions on the computer running the workflow
Error: Salesforce Input (2):   File "<string>", line 1
    os.environ['PATH'] = r"C:\Program Files\Alteryx\bin\Miniconda3\Library\bin;C:\Windows\system32;C:\Windows;"C:\Windows\System32\Wbem";C:\Users\llepome\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\Alteryx\bin;C:\Program Files\Alteryx\bin\plugins\;C:\ProgramData\Alteryx\Tools\SalesforceInput_v4.1.0\Lib\site-packages\pypiwin32_system32"
SyntaxError: invalid syntax
 
  • Error messages of this sort will appear even before running a workflow


Cause


This occurs because the Python-based tools read the path Environment Variables from Windows. If there are any path entries with quotes, this can happen because python doesn't expect quotes and doesn't handle them gracefully.



Resolution


  1. To correct this issue, administrator permissions are required to modify the Environment Variables.  Bring up the Environment Variables by typing in the Windows Search.
    idea Skyscrapers idea Skyscrapers
  2. Click on the Path or PATH entry (it's case insensitive) for User Environment Variables or for System Environment Variables, wherever you suspect the quotes are.  Both are used by the Connector tools, so it's important to verify there are no quotes in either of the path strings.
    idea Skyscrapers
  3. The only tricky part of this is that the quotes get suppressed in the editing view of the Environment Variables. 
    idea Skyscrapers
  4. You have to actually go into Edit Text to see and change them. 
    idea Skyscrapers

    idea Skyscrapers
  5. Click Ok all the way out to confirm the change and restart Designer.