Skip to content

MercuryAPI package download location changed #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Mixownt opened this issue Nov 25, 2019 · 9 comments
Closed

MercuryAPI package download location changed #97

Mixownt opened this issue Nov 25, 2019 · 9 comments

Comments

@Mixownt
Copy link

Mixownt commented Nov 25, 2019

I am unable to install python-mercuryapi both using pip(3) and the manual build.

Error log:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting python-mercuryapi
Using cached https://files.pythonhosted.org/packages/7b/11/f618c649b57145e1b03998cf4d732dedf2d9342a3ffbcbae2ba9bcb8a01c/python-mercuryapi-0.5.2.tar.gz
Building wheels for collected packages: python-mercuryapi
Running setup.py bdist_wheel for python-mercuryapi ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-a_2tlx2l/python-mercuryapi/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-d16_899y --python-tag cp37:
running bdist_wheel
running build
wget https://www.jadaktech.com/wp-content/uploads/2018/11/mercuryapi-1.31.2.zip
--2019-11-25 11:57:38-- https://www.jadaktech.com/wp-content/uploads/2018/11/mercuryapi-1.31.2.zip
Resolving www.jadaktech.com (www.jadaktech.com)... 192.124.249.53
Connecting to www.jadaktech.com (www.jadaktech.com)|192.124.249.53|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-11-25 11:57:39 ERROR 404: Not Found.

make: *** [Makefile:28: mercuryapi-1.31.2.zip] Error 8
running build_ext
building 'mercury' extension
creating build
creating build/temp.linux-armv7l-3.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ibuild/mercuryapi/include -I/usr/include/python3.7m -c mercury.c -o build/temp.linux-armv7l-3.7/mercury.o
mercury.c:23:10: fatal error: tm_reader.h: No such file or directory
#include <tm_reader.h>
^~~~~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1


Failed building wheel for python-mercuryapi
Running setup.py clean for python-mercuryapi
Failed to build python-mercuryapi
Installing collected packages: python-mercuryapi
Running setup.py install for python-mercuryapi ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-a_2tlx2l/python-mercuryapi/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-o0knd1ku/install-record.txt --single-version-externally-managed --compile:
running install
running build
wget https://www.jadaktech.com/wp-content/uploads/2018/11/mercuryapi-1.31.2.zip
--2019-11-25 11:57:41-- https://www.jadaktech.com/wp-content/uploads/2018/11/mercuryapi-1.31.2.zip
Resolving www.jadaktech.com (www.jadaktech.com)... 192.124.249.53
Connecting to www.jadaktech.com (www.jadaktech.com)|192.124.249.53|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-11-25 11:57:42 ERROR 404: Not Found.

make: *** [Makefile:28: mercuryapi-1.31.2.zip] Error 8
running build_ext
building 'mercury' extension
creating build
creating build/temp.linux-armv7l-3.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ibuild/mercuryapi/include -I/usr/include/python3.7m -c mercury.c -o build/temp.linux-armv7l-3.7/mercury.o
mercury.c:23:10: fatal error: tm_reader.h: No such file or directory
 #include <tm_reader.h>
          ^~~~~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-a_2tlx2l/python-mercuryapi/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-o0knd1ku/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-a_2tlx2l/python-mercuryapi/

@Mixownt
Copy link
Author

Mixownt commented Nov 25, 2019

It seems that the MercuryAPI package is no longer located at https://www.jadaktech.com/wp-content/uploads/2018/11/mercuryapi-1.31.2.zip. I tried modifying the MakeFile to point to an alternate internet adress (https://www.jadaktech.com/resources/rfid-document-library/thingmagic-mercury-api-v1-9-1-86/?download), but then the updated API seems to generate errors. I attached updated Makefile:

make -C mercuryapi-THOREAU-1.9.1.86/c/src/api
make[1]: Entering directory '/home/pi/python-mercuryapi/mercuryapi-THOREAU-1.9.1.86/c/src/api'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/pi/python-mercuryapi/mercuryapi-THOREAU-1.9.1.86/c/src/api'
mkdir -p build/mercuryapi/include
find mercuryapi-/c/src/api -type f -name '.h' ! -name '_imp.h' ! -path 'ltkc_win32' -exec cp {} build/mercuryapi/include/ ;
mkdir -p build/mercuryapi/lib
find mercuryapi-
/c/src/api -type f ( -name '.a' -or -name '.so.1' ) -exec cp {} build/mercuryapi/lib/ ;
/usr/bin/python3 setup.py build
running build
make[1]: Entering directory '/home/pi/python-mercuryapi'
make -C mercuryapi-THOREAU-1.9.1.86/c/src/api
make[2]: Entering directory '/home/pi/python-mercuryapi/mercuryapi-THOREAU-1.9.1.86/c/src/api'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/pi/python-mercuryapi/mercuryapi-THOREAU-1.9.1.86/c/src/api'
mkdir -p build/mercuryapi/include
find mercuryapi-/c/src/api -type f -name '.h' ! -name '_imp.h' ! -path 'ltkc_win32' -exec cp {} build/mercuryapi/include/ ;
mkdir -p build/mercuryapi/lib
find mercuryapi-
/c/src/api -type f ( -name '.a' -or -name '.so.1' ) -exec cp {} build/mercuryapi/lib/ ;
make[1]: Leaving directory '/home/pi/python-mercuryapi'
running build_ext
building 'mercury' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ibuild/mercuryapi/include -I/usr/include/python3.7m -c mercury.c -o build/temp.linux-armv7l-3.7/mercury.o
mercury.c:41:5: error: unknown type name ‘TMR_StatsListenerBlock’
Makefile.txt

@gotthardp gotthardp changed the title Unable to install on Rasbian MercuryAPI package download location changed Nov 25, 2019
gotthardp added a commit that referenced this issue Nov 25, 2019
@gotthardp
Copy link
Owner

Hello. I fixed the Makefile to use some version that can be downloaded. Note it is older than the version used before.
I believe Jadaktech have a bug in their website as the version 1.31.3 downloads as 1.31.1.36-2.

@Mixownt
Copy link
Author

Mixownt commented Nov 26, 2019

Thank you, I managed to install the wrapper now. However, when running the test.py program, I get TypeError: Timeout. Any ideas as to how this happens? I do not get this problem when initialising the pins with Serial.

@Mixownt
Copy link
Author

Mixownt commented Nov 26, 2019

Running rebootReader.c also gives "Error connecting reader: Timeout"

@gotthardp
Copy link
Owner

Timeout usually means a connectivity issue-- your reader is not connected, not enabled, not configured properly or something along those lines.

@Mixownt Mixownt closed this as completed Nov 28, 2019
@Mixownt Mixownt reopened this Nov 28, 2019
@Mixownt
Copy link
Author

Mixownt commented Nov 28, 2019

I solved the connectivity issues it was indeed on my side, as you suggested!

@Mixownt Mixownt closed this as completed Nov 28, 2019
@gotthardp
Copy link
Owner

Cool. What was the issue, please? Just in case others have a similar one.

@mdjong1
Copy link

mdjong1 commented Dec 3, 2019

Also interested

@Mixownt
Copy link
Author

Mixownt commented Dec 3, 2019

Cool. What was the issue, please? Just in case others have a similar one.

I am using the Sparkfun board, which boosts the Tx and Rx signals to 5V to be compatible with Arduino boards. I missed this, because the M6e Nano works at 3.3V and on the Sparkfun product page, they link the M6e datasheet.

My RPi however works at 3.3V, so I had to put a logic level convertor in between or work via a FTDI breakout to go to USB. It works fine now, but on RPi I frequently get timout or segmentation fault errors, while on my main laptop, I have no issue whatsoever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants