Error on Creating a Scriptag with Python API

Highlighted
Shopify Partner
7 0 0

Hi,

I've been trying to create my first app and wanted to add a script tag to the online store. So, using the Shopify Python API, I was able to make connection and get my access token. While I was trying to add a script tag, it returns False on .save(). I tried using .errors.full_messages() which returned an empty list.

session2 = shopify.Session("%s.myshopify.com" % (shop), token)
shopify.ShopifyResource.activate_session(session2)
scrpt = shopify.ScriptTag(dict(event='onload', src=cfg.HOST+"/test.js")).save()
print("Script Status", scrpt)

When I tried replacing .save() with .errors.full_messages() to get error messages, I got an empty list. 

What am I doing wrong?

0 Likes
Highlighted
Shopify Partner
7 0 0

Gotcha... Source didn't have "https://"

0 Likes