...
ID | Description | Solution | |||||
---|---|---|---|---|---|---|---|
1 | TypeError while calling requests.post() command, e.g.:
This error occurs with older versions of requests < 2.4.2. | [A] Update requests (recommended): pip install requests --upgrade [B] Manually set the header definitions while calling 'my_url' with 'my_json_data':
| |||||
2 | Serialization of complex data structures: Simple data structures (e.g. a dictionary of dictionaries or arrays) are directly serializable by the json module and do not need any conversion (see code example above). However, with more complex structures the following errors may occur:
In both cases we try to serialize characters which are not supported either by the codec (e.g. utf-8) or the database. | [A] Using the bas64 codec we can 'transform' each character into a simple ASCII representation (escaping all special characters):
|
Info |
---|
This page was adopted from Ingest property data in database (REST API). |