Azure release syntax error with Python script task accessing the predefined variables

Viewed 27

In azure devops I have release task run python script. Its giving me syntax error while accessing the predefined variable.

SyntaxError: invalid decimal literal

import requests
import adal
import json

clientId = $(app-id)
tenantId =$(app-id)
clientSecret = $(secret)
subscription_id = $(SUBSid)
1 Answers

I can reproduce your issue.

Suggest you to use these code to get the variables you defined:

  import requests
  import adal
  import json
  
  clientId = "$(app-id)"
  tenantId = "$(app-id)"
  clientSecret = "$(secret)"
  subscription_id = "$(SUBSid)"

Let me know whether this can help you solve the issue.

Related