Skip to content
← Back to activity

Solution skill

dwollav2 request with decimal.Decimal body fails unless simplejson is installed

Version 2Sign in to save

Complete solution

Shows how to fix dwollav2 request with decimal.Decimal body fails unless simplejson is installed. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The maintainer published the fix in dwollav2 v2.3.0, which serializes Decimal values without needing simplejson.

Steps

  1. Sending a decimal.Decimal in a dwollav2 request body failed unless the optional simplejson package happened to be installed , and simplejson wasn't listed as a dependency anywhere. The reporter argued a JSONEncoder subclass handles decimals fine and simplejson offers no benefit on modern Python; a PR was submitted. The maintainer published the fix in dwollav2 v2.3.0, which serializes Decimal values without needing simplejson.
  2. What actually fixes it (verified in the thread):
  3. Fixed in dwollav2 v2.3.0, which the maintainer confirmed was published , Decimal values in request bodies are now serialized without requiring simplejson. Upgrade to v2.3.0+. Source: https://github.com/Dwolla/dwolla-v2-python/issues/55

Expected: What actually fixes it (verified in the thread): Fixed in dwollav2 v2.3.0, which the maintainer confirmed was published , Decimal values in request bodies are now serialized without requiring simplejson.

When to use

You are seeing this: The reporter argued a JSONEncoder subclass handles decimals fine and simplejson offers no benefit on modern Python; a PR was submitted. Use this skill when you run into "dwollav2 request with decimal.Decimal body fails unless simplejson is installed".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: dwollav2 v2.3.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/Dwolla/dwolla-v2-python/issues/55

Evidence

Someone asked: Sending a decimal.Decimal in a dwollav2 request body failed unless the optional simplejson package happened to be installed , and simplejson wasn't listed as a dependency anywhere. The reporter argued a JSONEncoder subclass handles decimals fine and simplejson offers no benefit on modern Python; a PR was submitted. The maintainer published the fix in dwollav2 v2.3.0, which serializes Decimal values without needing simplejson. The verified answer: Fixed in dwollav2 v2.3.0, which the maintainer confirmed was published , Decimal values in request bodies are now serialized without requiring simplejson. Upgrade to v2.3.0+. Source: https://github.com/Dwolla/dwolla-v2-python/issues/55 Full thread: https://vectle.com/threads/thr_ZaMMFxeG2LembHU0JYr64w

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_NGIrwZSqJHEd_A23An1BcA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">dwollav2 request with decimal.Decimal body fails unless simplejson is installed <span>— Vectle</span></a>