Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8613505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:53:39+00:00 2026-06-12T04:53:39+00:00

I am trying to create an asset using the shopify python library but I’m

  • 0

I am trying to create an asset using the shopify python library but I’m getting a ResourceNotFound exception. The following is a snippet of my code.

asset = shopify.Asset(dict(key=self.key, theme_id=theme_id))
asset.attach(image.read())
asset.save()

Here’s the stacktrace of the exception

Traceback:
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/core/handlers/base.py" in get_response
  105.                         response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/local/lib/python2.7/site-packages/mezzanine/pages/middleware.py" in process_view
  45.             return view_func(request, *view_args, **view_kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/views/generic/base.py" in view
  48.             return self.dispatch(request, *args, **kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/utils/decorators.py" in _wrapper
  25.             return bound_func(*args, **kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/contrib/auth/decorators.py" in _wrapped_view
  20.                 return view_func(request, *args, **kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/utils/decorators.py" in bound_func
  21.                 return func(self, *args2, **kwargs2)
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/utils/decorators.py" in _wrapper
  25.             return bound_func(*args, **kwargs)
File "/home/rodxavierbondoc/workspace/sg/djangoproject/shopify_app/decorators.py" in wrapper
  10.         return func(request, *args, **kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/utils/decorators.py" in bound_func
  21.                 return func(self, *args2, **kwargs2)
File "/home/rodxavierbondoc/workspace/sg/djangoproject/shopify_galleries/views.py" in dispatch
  81.         return super(UploadImageView, self).dispatch(request, *args, **kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/views/generic/base.py" in dispatch
  69.         return handler(request, *args, **kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/src/django/django/views/generic/edit.py" in post
  138.             return self.form_valid(form)
File "/home/rodxavierbondoc/workspace/sg/djangoproject/shopify_galleries/views.py" in form_valid
  96.             image.store_image(image_field)
File "/home/rodxavierbondoc/workspace/sg/djangoproject/shopify_galleries/models.py" in store_image
  62.             asset.save()
File "/home/rodxavierbondoc/.virtualenvs/shopify/local/lib/python2.7/site-packages/shopify/base.py" in save
  151.         return super(ShopifyResource, self).save()
File "/home/rodxavierbondoc/.virtualenvs/shopify/local/lib/python2.7/site-packages/pyactiveresource/activeresource.py" in save
  775.                         data=self.to_xml())
File "/home/rodxavierbondoc/.virtualenvs/shopify/local/lib/python2.7/site-packages/pyactiveresource/connection.py" in put
  351.         return self._open('PUT', path, headers=headers, data=data)
File "/home/rodxavierbondoc/.virtualenvs/shopify/local/lib/python2.7/site-packages/shopify/base.py" in _open
  18.             self.response = super(ShopifyConnection, self)._open(*args, **kwargs)
File "/home/rodxavierbondoc/.virtualenvs/shopify/local/lib/python2.7/site-packages/pyactiveresource/connection.py" in _open
  287.                 http_response = self._handle_error(err)
File "/home/rodxavierbondoc/.virtualenvs/shopify/local/lib/python2.7/site-packages/pyactiveresource/connection.py" in _handle_error
  407.             raise ResourceNotFound(err)

Exception Type: ResourceNotFound at /galleries/upload/
Exception Value: Not Found: https://sawayn-and-sons9677.myshopify.com/admin/themes/3422503/assets.xml

any ideas on why this is happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:53:40+00:00Added an answer on June 12, 2026 at 4:53 am

    I found your request in our logs, and noticed that the key you are using is “14e2ccbe-601e-4bd8-bb61-726c221b53cf-6..png”.

    Assets need to be in a suitable directory.

    • Liquid templates => “templates/”
    • Liquid layouts => “layout/”
    • Liquid snippets => “snippets/”
    • Theme settings => “config/”
    • General assets => “assets/”
    • etc

    In your case you probably want key = "assets/14e2ccbe-601e-4bd8-bb61-726c221b53cf-6.png"

    Sorry about the unhelpfulness of the error message. The 404 was referring to the key’s directory not being found.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write metadata to a pdf file using the following python code:
I'm trying to create authentication from scratch using bcrypt and I'm getting a webrick
I am receiving the following exception when trying to run my unit tests using
I am getting the following error when trying to upload an image using paperclip
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Ok so I am trying create a login script, here I am using PHP5
Trying to create a black line in my view to separate text blocks but
Trying to create a new Dedicated Cache Role in Windows Azure but get the
Trying to create a background-image slideshow and am getting this error... This is the
I ran across this pattern in the code of a library I'm using. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.