can't create new record if no records in table
Closed this issue · 2 comments
aptivait commented
when I attempt to create a record (fms.create_record) in a table with no current records, I get the following error:
Traceback (most recent call last):
File "fmtest.py", line 51, in <module>
records = fms.get_records()
File "/usr/local/lib/python3.6/site-packages/fmrest/server.py", line 381, in get_records
response = self._call_filemaker('GET', path, params=params)
File "/usr/local/lib/python3.6/site-packages/fmrest/server.py", line 585, in _call_filemaker
fms_messages[0].get('message', 'Unkown error'))
fmrest.exceptions.FileMakerError: FileMaker Server returned error 101, Record is missing
If I manually create a blank record in FileMaker Pro the python script works as intended, but with a blank record in the table.
davidhamann commented
I couldn't reproduce the error by calling create_record
on an empty table – works fine here.
From the traceback it looks like you are calling get_records() and therefore getting the 101, Record is missing
. Maybe your script first calls get_records
and that leads to the issue?
If that's not the issue, do you mind posting your script here so that I can investigate?
Thanks,
David
aptivait commented
yeah that's it, thanks for pointing that out! much appreciated