Comments (9)
A try/catch is a last resort, and would mask the underlying problem. If you can provide the exact circumstance (ie. extract of HTTP request) which cause it, we can put in a proper solution. Thanks!
from django-paypal.
I couldn't be able to store the HTTP request in the logs, but I have enabled it from now, to store in case I receive again the error.
I'll keep you up to date.
Thanks!
from django-paypal.
Closing as not enough info was provided, and this is old now.
from django-paypal.
Hi,
I'm having this error in my application using version 0.2
. This is the request params that's causing this:
{
"protection_eligibility": "Ineligible",
"last_name": "Bar",
"txn_id": "25F78140PL237475G",
"receiver_email": "[email protected]",
"payment_status": "Completed",
"tax": "0.00",
"residence_country": "BR",
"invoice": "0c85c58f-df5b-baz-bar-foo",
"payer_status": "unverified",
"txn_type": "web_accept",
"handling_amount": "0.00",
"payment_date": "17:00:38 Apr 19, 2015 PDT",
"first_name": "Foo",
"item_name": "Foobar",
"charset": "windows-1252",
"notify_version": "3.8",
"receiver_id": "27L7EUKFFCSPS",
"business": "[email protected]",
"payer_id": "W832M3A7B44MU",
"verify_sign": "AaXhtpwght6PEuy-z7LFdf...",
"mc_fee": "3.10",
"mc_currency": "BRL",
"shipping": "0.00",
"payer_email": "[email protected]",
"payment_type": "instant",
"mc_gross": "39.00",
"ipn_track_id": "f17a",
"quantity": "1"
}
And this is the stacktrace:
Traceback (most recent call last):
File "/home/cm/envs/cm/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
File "/home/cm/envs/cm/local/lib/python2.7/site-packages/newrelic-2.28.0.26/newrelic/hooks/framework_django.py", line 496, in wrapper
File "/home/cm/envs/cm/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner
File "/home/cm/envs/cm/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
File "/home/cm/envs/cm/local/lib/python2.7/site-packages/paypal/standard/ipn/views.py", line 68, in ipn
File "/home/cm/envs/cm/local/lib/python2.7/site-packages/paypal/standard/models.py", line 288, in set_flag
UnicodeDecodeError 'ascii' codec can't decode byte 0xc3 in position 102: ordinal not in range(128)
from django-paypal.
I'm seeing this as well. It looks like a Unicode object (self.flag_info
) is concatenated with a byte object info
which contains non-ascii characters.
All assignments of flag
here are byte objects and the last two may contain non-ascii characters. Not sure if this is the root cause though.
from django-paypal.
@spookylukey Can you open this issue again? I'll try to look into it and fix.
from django-paypal.
I'm having the same issue.
I looked it up and in fact it is two problems 😔
1st: UnicodeDecodeError
The problem and solution proposed by @stefanw is ok. When a form error have no-ascii characters we get the error. It was happening because my django is in pt-BR and my form errors have accents.
The real error in fact was that PayPal retry_at
field was not in the PayPal date format.
I saw that many fields was already patched. I did a quick test adding retry_at
in that list and it worked fine. But I didn't run any unit tests yet.
What do you guys think? I can send a PR later.
from django-paypal.
The UnicodeDecodeError should have been addressed in 686382b
from django-paypal.
Both issues should now be addressed in 0.2.5
from django-paypal.
Related Issues (20)
- Upgrade or Downgrade subscription plan HOT 1
- PDT payments intermittently broken? HOT 4
- Listing the payments HOT 1
- Paypal notify url webook expecting x-www-form-urlencoded but received application/json from paypal HOT 1
- Testing with paypal sandbox and ngrok resulting in invalid postback HOT 1
- Received 3 IPNs for the same transaction, only one flagged as duplicate HOT 3
- Paying directly with a debit card HOT 1
- Working with react js HOT 1
- version 2.0 - update docs and tag HOT 3
- Encrypted form gives different interface on PayPal HOT 1
- Custom data got truncated HOT 4
- "Things don't appear to be working at the moment. Please try again later." HOT 3
- Add pay now button
- untested warning for is_subscription HOT 4
- How to use this sdk in django-rest-framework HOT 2
- Any pointers on how to integrate with Django Oscar?
- application/json vs application/x-www-form-urlencoded
- Increase the size of the logo HOT 2
- Add `Django 5.0` compatibility. HOT 2
- Outdated package and documentation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-paypal.