question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

shopify.ApplicationCharge.create: expected string or bytes-like object

See original GitHub issue

I’m trying to create charge:

application_charge = shopify.ApplicationCharge.create(
        {
            'name': 'My public app',
            'price': 123,
            'test': True,
            'return_url': 'https://domain.com/approve'
        }
    )


and I get this error:

TypeError: expected string or bytes-like object

Any ideas how to fix this?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
smubbscommented, Aug 11, 2020

It would be really nice if the error was more meaningful for this. It would save a lot of confusion.

1reaction
Marijuscommented, Aug 10, 2020

@smubbs

That solved my issue. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shopify Python Django "expected string or bytes-like object ...
I am using PythonAPI for Django. my code is: def shopify_admin_home(request): products = shopify.Product.find(limit=3) data = { 'products': ...
Read more >
shopify.ApplicationCharge.create: expected string or bytes-like object -
I'm trying to create charge: application_charge = shopify.ApplicationCharge.create( { 'name': 'My public app', 'price': 123, 'test': True, ...
Read more >
TypeError: expected string or bytes-like object #480 - GitHub
I believe this is because you have not initialized the session. Try like below , should work. with shopify.Session.temp(shop_url, api_version, ...
Read more >
TypeError expected string or bytes-like object - STechies
While working with functions, there may be an error called “TypeError expected string or bytes-like object”. This is usually encountered when a function ......
Read more >
How to Fix: Typeerror: expected string or bytes-like object
This tutorial explains how to fix the following error in Python: How to Fix: Typeerror: expected string or bytes-like object.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found