Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Error: no attribute 'populate_token_attributes'

SophiaF
Alteryx
Alteryx
Created

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 (Highlight to read)
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'
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 Designer2018.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-oauthlibPython 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 Galleryor 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 selectYesto 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.

No ratings
Comments
ebarr
7 - Meteor

This resolved my issue! Thank you...

DiganP
Alteryx Alumni (Retired)

@SophiaF Why don't you attach the updated connector? 🙂

PriscilaVS
5 - Atom

This help me. Resolved, thank you!

SabrinaCB
Alteryx Alumni (Retired)

This was resolved for PowerBI in Version 2.1.2 of the tool and above. Still applicable to the Dynamics CRM tool.