davidhamann / python-fmrest

Python wrapper around the FileMaker Data API
MIT License
100 stars 27 forks source link

edit_record() returning Filemaker Error 101, though the record is accessible by using find() #62

Open aa-dank opened 1 year ago

aa-dank commented 1 year ago

I am having trouble updating a records.

For almost all record numbers this code cooperates but occasionally it yields a "Filemaker Error Code 101 - Record Is Missing":

server = fmrest.Server(url=self.url,
                               user=user_name,
                               password=some_password,
                               database='UCPPC',
                               layout='rfilog_raw_table',
                               api_version='v1')
server.login()
server.edit_record(record_id=20818, field_data={'Answer': 'blah blah blah', 'Answer Date': '11/07/2021'})

...despite the fact that doing this gets the records object as expected:

server = fmrest.Server(url=self.url,
                               user=user_name,
                               password=some_password,
                               database='UCPPC',
                               layout='rfilog_raw_table',
                               api_version='v1')
server.login()
rec = server.get(20818)

...but then I am unaware of how one might update the record object for fields/attributes that cannot be attributes (eg 'Answer Date' field.)

This is for Filemaker Server 19. The python code is Python 3.9.11 on Windows 10. python-fmrest Ver 1.6.0

Any thoughts on resolving this would be appreciated.

aa-dank commented 1 year ago

Some discussion about this issue here: https://www.briandunning.com/errors/96

I should clarify that the script uses edit_record dozens of times sucessfully before getting hung up on this one record.

This is the values used when making the call:

Call results: response.json() --> {'messages': [{'code': '101', 'message': 'Record is missing'}], 'response': {}}