OK. after some detailed analysis I found these facts that I forward to WRC:

  • normal JOB command ISOS/COS
    • returns $TEST to signal success/fail
    • $ZC the id of the started job.
    • this happens after complete init of the job or eventually timed
    • is always ASYNCHRONOUS  to the background job
  • JOB command for Embedded Python if not timed
    • Hangs until AFTER completion of the started job
    • then return $TEST and $ZC which is useless as the job is gone!
    • acts SYNCHONOUS to the started job 
  • timed JOB command for Embedded Python
    • returns after the timeout with $TEST = 0  ==> FAILED
    • does not return the id of the started JOB
    • though the started Job may work fine
    • you just don't get info and may find out by other means if it is OK
  • Workaround until a fix.
    • Start a background job as ISOS/COS Class Method
    • let this class method start your method in Embedded Python.

Another reason why Embedded Python Pure is just a fiction

What you see is typical for an inappropriate double encoding.

 
USER>r c
Gômez Jesús María
USER>zzdump c
0000: 47 F4 6D 65 7A 20 4A 65 73 FA 73 20 4D 61 72 ED         Gômez Jesús Marí
0010: 61     
;;; this is already encode in UTF-8 !!!!! 
;;; what you name RAW is already UTF-8 !!!                                                a

USER>s z=$zcvt(c,"O","UTF8")
USER>w z
Gômez Jesús María
;;; now its just broken
USER>zzdump z
0000: 47 C3 B4 6D 65 7A 20 4A 65 73 C3 BA 73 20 4D 61         Gômez Jesús Ma
0010: 72 C3 AD 61                                             ría
USER>

Hi @Stuart Strickland !

This well-known effect is named Proleptic Gregorian Calendar.
A bunch of other DBs is using it as well. As well as my favorite competitor O*****.

This means it calculates backward as if we always had the Gregorian date since the beginning
and the lost days in  October 1582 and other adjustments are ignored.
In fact, at that time almost every country and smaller had its own calendar. Often like "in the 3rd month of the 7th year of the reign of Duke Goofy 4th".  And converting regional dates from Spain to England or Franc or Italy or Ireland or even Scandinavia is a special mathematical exercise for students of History. On top of that, you often don't have the information if they counted years by Sun calendar or by Moon calendar.

 
 

from session use the SQL Shell

PROMPT>do $system.SQL.Shell()
SQL Command Line Shell
----------------------------------------------------
The command prefix is currently set to: <<nothing>>.
Enter <command>, 'q' to quit, '?' for help.
[SQL]PROMT>>SELECT whatever single line SQL

or


PROMPT>do $system.SQL.Shell()
SQL Command Line Shell
----------------------------------------------------
 
The command prefix is currently set to: <<nothing>>.
Enter <command>, 'q' to quit, '?' for help.
[SQL]PROMPT>>  << entering multiline statement mode, 'GO' to execute >>
        1>>

you should check a few things upfront
- is your Caché a 64 bits installation and is the   pythonbind3.c  also compiled for 64 bit   (or both 32bit)
  this might be one possible reason for the "data mismatch" you mention
- pythonbind3.c seems to be a C code using the Callin Interface.
  this requires Service %Service_CallIn to be enabled with user, passwd, ...
- next check the SuperServer Port (default = 1972)
- connect to a USER namespace. Since %SYS requires rather high privileges.
- then check if the connection really works.
  once established it should be possible to identify the related process from
  System Management Portal / Operations / Processes showing the client_exe, namespace, ...
- then you may start composing queries.
 

A little bit of guessing from my side. behind your page /csp/test/person.csp
there is a namespace  (eg. USER)  with DB user 
If you have no login page you run as "UnknownUser" 
If it has no access rights or appropriate roles (most likely) for this DB behind you are lost;

2 possible workarounds: 

  1. give "UnknownUser"  enough rights for this Namespace and/or DB. 
    • but this is then valid not just to this specific CSP page
    • not really recommendable
  2. create a new user with the required rights
    • on your CSP page you can assign this user undercover by method
    • %CSP.Session.Login() and you have PW under control
    • no need  to touch "UnknownUser"

with CSP you have a license user that can be changed by %CSP.Session.Login()

Login with this username and password, returns a status code to show if it worked or not. This method also trades license units at the same time so this CSP session will be logged in as a named user. If you pass type=1 then this will trade licenses only and not login as this user. After the login completes it also updates the property Username to match the $username value this session is logged in as. The property LicenseId is also updated to be the license identifier that this session is logged in with.
If a login fails then the property Username and property LicenseId will remain at their previous values. If you pass oldpassword then this will attempt to change the password of username from oldpassword to password and login as this user. Note new status return values: CSP applications can be two-factor-enabled. If the current application is one such, then if Login() successfully authenticates the username/password, it does not return $$$OK, but rather $$$CSPPendingTwoFactorAuthentication. During Two-Factor Authentication, an 8-character numeric security string will be sent to the user's cellphone. You must obtain this string from the user and call CompleteTwoFactorLogin^%CSP.Session() to complete authentication of this user. Also note that if the login SUCCEEDS (status returned will be $$$OK), but you were unable to secure a license, the new apperr parameter will have the value of $$$CSPErrorTradeLicense. In such a case, you may have to call the Login function again to trade a license. If you are calling merely to trade a license (type=1), then if the license trade fails, Login will return a status of $$$CSPErrorTradeLicense.

And that's the description

classmethod GenerateMappingFromXdata(class As %String, ByRef mapping) as %Status

Get the JSON adaptor configuration information from class and property parameters.

BUT:
https://docs.intersystems.com/iris20212/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=%25SYS&CLASSNAME=%25JSON.Generator

This class is used internally by InterSystems IRIS. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.