adrobinoga / pyzatt

Python lib to access ZKTeco's standalone devices
MIT License
106 stars 55 forks source link

AttributeError: module 'pyzatt.misc' has no attribute 'print_hex' #21

Open suzondas opened 3 years ago

suzondas commented 3 years ago

I wanted to check realtime for my Zkteco F18/ID machine. When I try to run I get following conclusion.

What I Did

D:\xampp\htdocs\tad-php-mysql\pyzatt-master\tests>python test_realtime.py

running manual test
?[1m?[32m
################################################################################
#       TEST OF REALTIME FUNCTIONS
?[0m
?[1m?[32m
################################################################################
#       1.Realtime Test
?[0m
Invalid checksum
Bad start tag
Bad start tag
?[1m?[32mReady to receive events from the machine?[0m
Bad start tag

##################################################
Received event
Unknown event:
Traceback (most recent call last):
  File "test_realtime.py", line 134, in <module>
    test_realtime(opts)
  File "test_realtime.py", line 123, in test_realtime
    misc.print_hex(z.get_last_packet())
AttributeError: module 'pyzatt.misc' has no attribute 'print_hex'
suzondas commented 3 years ago

After digging out, I found the issue with z.read_all_user_id() function. When My machine get user more thean 940 then this function returns : Invalid checksum Bad start tag Bad start tag ?[1m?[32mReady to receive events from the machine?[0m Bad start tag

Can you look for the issue?