community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Error: no attribute 'populate_token_attributes'

Moderator
Moderator
Created on

Issue

 

When running a workflow that uses the Dynamics CRM Input/Output or PowerBI Output tool(s), the following error is seen:

 

AttributeError: 'AzureActiveDirectoryWebApplicationClient' object has no attribute 'populate_token_attributes'

 

Full error text:

 

Spoiler
For PowerBI Output:

Error: Power BI Output (3): Traceback (most recent call last):
 File "C:\ProgramData\Alteryx\Tools\power_bi_output_v2.1.1\power_bi_output\connections.py", line 84, in ii_init
 token_updater=self._update_token
 File "C:\ProgramData\Alteryx\Tools\power_bi_output_v2.1.1\Lib\site-packages\requests_oauthlib\oauth2_session.py", line 69, in __init__
 self.token = token or {}
 File "C:\ProgramData\Alteryx\Tools\power_bi_output_v2.1.1\Lib\site-packages\requests_oauthlib\oauth2_session.py", line 119, in token
 self._client.populate_token_attributes(value)
AttributeError: 'AzureActiveDirectoryWebApplicationClient' object has no attribute 'populate_token_attributes'

For Dynamics CRM Input/Output:

Error: Dynamics CRM Input (1): Traceback (most recent call last):
File "C:\ProgramData\Alteryx\Tools\dynamics_crm_input_v1.0.2\dynamics_crm_input\engine.py", line 132, in pi_push_all_records
alteryx_engine=self.alteryx_engine
File "C:\ProgramData\Alteryx\Tools\dynamics_crm_input_v1.0.2\connectors_core\dynamics\crm.py", line 62, in __init__
token_updater=self._update_token
File "C:\ProgramData\Alteryx\Tools\dynamics_crm_input_v1.0.2\Lib\site-packages\requests_oauthlib\oauth2_session.py", line 69, in __init__
self.token = token or {}
File "C:\ProgramData\Alteryx\Tools\dynamics_crm_input_v1.0.2\Lib\site-packages\requests_oauthlib\oauth2_session.py", line 119, in token
self._client.populate_token_attributes(value)
AttributeError: 'AzureActiveDirectoryWebApplicationClient' object has no attribute 'populate_token_attributes'

 

Environment

 

  • Alteryx Designer ≥ 2018.2
  • Windows Operating System
  • PowerBI Output tool
  • Dynamics CRM Input/Output Tool(s)

 

Cause

 

During the installation of the tool, a newer version of the requests-oauthlib Python package was downloaded. This tool requires a specific version in order to function properly. This is currently a defect (DE18610) that will be fixed in future versions of the tool(s).

 

 

Solution

 

Edit the requirements.txt file to the necessary version, then reinstall the tool. Please first remove any previously installed tools from your machine. They can be found in either:

  • %AppData%\Roaming\Alteryx\Tools
  • %ProgramData%\Alteryx\Tools

 

  1. Download the .yxi from the Alteryx Gallery or use the .yxi you used to install the tool.

  2. Change the extension from .yxi to .zip by renaming the tool: Right-click > Rename
    1. Note: You will be prompted that the file may become unusable by renaming it - please select Yes to proceed.

      requests.gif
  3. Extract the contents of this zip: Right-Click > Extract All (or use your favorite zip utility).

  4. Navigate to the extracted folder.

  5. Open the tool folder.
    1. For Dynamics CRM, you will have two folders (one for the Input tool and one for the Output tool).

      requests2.png
    2. For PowerBI, you will have one tool folder.

  6. Open the requirements.txt file in your favorite text editor.

  7. Add the version to the line containing requests-oauthlib and save the file:
    1. Change From: requests-oauthlib
    2. To: requests-oauthlib==1.0.0 


       requests2.gif
  8. Repeat Steps 5-7 for the Output tool if editing the Dynamics CRM tools.

  9. Navigate back to the root folder.

           requests3.png
           powerbiroot.png
  10. Select all the files and add to a zip: Select all > Right-Click > Send to > Compressed (zipped) Folder.
          

    requests3.gif
  11. Change the extension from .zip to .yxi by renaming the tool: Right-Click > Rename.

  12. Double-click the .yxi to reinstall the tool.

 

Solution B

 

1. If you are unable to get the above steps to work, please open a support ticket in the Case Portal.

Comments
Meteoroid

This resolved my issue! Thank you...