raise RecordError('Not a valid record instance. record_id is missing.') from None
Closed this issue · 4 comments
Hi - first ever GitHub error report. Apologies if I'm missing any key info.
Installing fmREST on a Raspberry Pi and getting the following error at install, and when I just try to make a test connection to a FM17 database:
"raise RecordError('Not a valid record instance. record_id is missing.') from None"
Full install error:
Downloading/unpacking python-fmrest
Downloading python-fmrest-1.0.2.tar.gz
Running setup.py (path:/tmp/pip-build-IDzUuN/python-fmrest/setup.py) egg_info for package python-fmrest
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages (from python-fmrest)
Installing collected packages: python-fmrest
Running setup.py install for python-fmrest
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
File "/usr/local/lib/python2.7/dist-packages/fmrest/server.py", line 241
raise RecordError('Not a valid record instance. record_id is missing.') from None
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/fmrest/record.py", line 75
raise AttributeError(ex) from None
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/fmrest/utils.py", line 28
raise RequestException(ex, args, kwargs) from None
^
SyntaxError: invalid syntax
File "/usr/local/lib/python2.7/dist-packages/fmrest/foundset.py", line 85
) from ex
^
SyntaxError: invalid syntax
Successfully installed python-fmrest
Cleaning up...
OS:
Linux pi-signage1 4.9.40-v7+ #1022 SMP Sun Jul 30 11:16:10 BST 2017 armv7l GNU/Linux
Hi, Thanks for the report.
it seems you are using Python 2.7 whereas the library only supports Python 3.6+. Can you use Python 3? Let me know if it works or if you are having more issues.
I will look into a way to prevent that you are able to install it on older versions to avoid confusion. So I will keep this issue open for now.
Thanks for the quick reply, David.
I've struggled getting 3.6 or 3.7 going on Pi's in the past for other projects, but I got it installed and compiled with ease this time.
But... when I run your sample login code with:
python3.6 test.py
It complains that fmrest is not installed. When I check with pip3, it appears to have installed it to python3.4 not 3.7, presumably from an earlier attempt at installing python3. Do you have a tip on how to point pip3 at the correct/new python3.7? I know that this is unrelated to this codebase, but might be helpful to others who run into my install issue.
David - I can use google to figure this out. Sorry...
Versions are now pinned in v1.0.3; old releases won't change, so pip
might automatically downgrade and find a release without python_requires
, but it's there now for the future.
@alfista2600 Have a look at Virtualenv. It makes running multiple Python versions and dependencies really easy. In case you are accidentally calling the wrong Python/pip you may want to check and maybe adjust your $PATH
. Hope this helps.