GithubHelp home page GithubHelp logo

Comments (9)

spookylukey avatar spookylukey commented on August 18, 2024

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.

alvarovelezgalvez avatar alvarovelezgalvez commented on August 18, 2024

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.

spookylukey avatar spookylukey commented on August 18, 2024

Closing as not enough info was provided, and this is old now.

from django-paypal.

rafaelks avatar rafaelks commented on August 18, 2024

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.

stefanw avatar stefanw commented on August 18, 2024

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.

rafaelks avatar rafaelks commented on August 18, 2024

@spookylukey Can you open this issue again? I'll try to look into it and fix.

from django-paypal.

thiagogds avatar thiagogds commented on August 18, 2024

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.

spookylukey avatar spookylukey commented on August 18, 2024

The UnicodeDecodeError should have been addressed in 686382b

from django-paypal.

spookylukey avatar spookylukey commented on August 18, 2024

Both issues should now be addressed in 0.2.5

from django-paypal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.