OpenFn / OpenFn/adaptors

Marshall Error on OpenSPP Adaptor

Open
#720 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
JavaScript
Stars
24
Forks
41
Avg merge
3d 13h
Merged PRs (30d)
12

Description

When running a function that requires a POST (createX where X can be individual, group, et.c) functionality in the OpenSPP adaptor, the process runs successfully but logs a marshall error.

See logs below

R/T Executing 863d2842-6f1f-455c-ba24-e320901057ab
R/T Starting step Push data to OpenSPP
R/T [linker] loading module @openfn/language-openspp
R/T [linker] Loading module @openfn/language-openspp from /tmp/openfn/worker/repo/node_modules/@openfn/language-openspp_2.0.0/dist/index.cjs
R/T Resolved adaptor @openfn/language-openspp to version 2.0.0
R/T Executing expression (1 operations)
R/T Starting operation 1
ADA ✗ Error: Error: XML-RPC fault: Traceback (most recent call last):
  File "/usr/local/lib/python3.10/xmlrpc/client.py", line 522, in __dump
    f = self.dispatch[type(value)]
KeyError: <class 'odoo.api.res.partner'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/addons/base/controllers/rpc.py", line 147, in xmlrpc_2
    response = self._xmlrpc(service)
  File "/opt/odoo/custom/src/odoo/odoo/addons/base/controllers/rpc.py", line 128, in _xmlrpc
    return xmlrpc.client.dumps((result,), methodresponse=1, allow_none=False)
  File "/usr/local/lib/python3.10/xmlrpc/client.py", line 981, in dumps
    data = m.dumps(params)
  File "/usr/local/lib/python3.10/xmlrpc/client.py", line 514, in dumps
    dump(v, write)
  File "/usr/local/lib/python3.10/xmlrpc/client.py", line 526, in __dump
    raise TypeError("cannot marshal %s objects" % type(value))
TypeError: cannot marshal <class 'odoo.api.res.partner'> objects

R/T Operation 1 complete in 1.468s
R/T Expression complete!
R/T Removed configuration from final state
R/T Completed step Push data to OpenSPP in 4.202s
R/T Final memory usage: [step 18mb] [system 108mb]
R/T Run complete with status: success

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing a POST operation such as createX through the OpenSPP adaptor and inspect how its XML-RPC response is handled. Use the logged marshalling traceback as the first diagnostic clue. Done means the operation completes without the marshalling error and its result is handled correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.