Comments (6)
From eSSP.py remove line 313 and 314.
Edit the get_last_event to this:
def get_last_event(self): """Get the last event and delete it from the event list""" event = [0,0,0] if(len(self.events) >= 1): event = self.events[len(self.events) - 1] self.events.pop(len(self.events) - 1) return event
It couldn't work because the Event list got filled up with garbish and sometimes with a real event.
from essp.
I'm having a similar issue with the get_last_event() function and get the following error:
File "/home/waitnrest/Documents/WaitNRest_Projects/Billetero/lib/python3.6/site-packages/eSSP/eSSP.py", line 346, in get_last_event
event = self.events[len(self.events) - 1]
IndexError: list index out of range
Using the code you provided I get another error:
(note, currency, event) = validator.get_last_event()
TypeError: 'NoneType' object is not iterable
I'm using the example code with an NV11+. A little bit of help would be much appreciated.
from essp.
Which Version of python you're using? I was using 3.7.x on a raspberry pi and it worked. Make sure that you execute and compile the library with the correct python version!
from essp.
I'm currently using python 3.7.5 on a jetson nano in a virtual environment.
I get this new error:
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "example_billetero.py", line 14, in event_loop
(note, currency, event) = validator.get_last_event()
TypeError: cannot unpack non-iterable NoneType object
It might be an error with the library because I could not use the command pip install eSSP6
to install it. Only with the pip install git+https://github.com/Minege/eSSP
would install. I may need a recent version of Python. Or maybe the library does not work with the NV11+. From the tests I've been doing, it looks like the Threading is not working properly.
from essp.
On raspi pip used python 2.7. I had to use pip3 for python 3.
I changed to the offical ITL C# Library on Windows and implemented the example code from ITL dev pack into ASP.NET Application for a custom API which I'm able to use later. It makes life much easier because most commands are implemented but depending on your situation you might need to implement threading, queuing and proper error handling for commands yourself. Without proper queuing CRC checks might fail and will fail if you're using a NV11+ and SmartHopper SH4 together. You're able to request the dev package via support.
from essp.
Thanks for the help. I will certainly look into it.
from essp.
Related Issues (19)
- Refactor `set_route_...` and other action methods
- TypeError: unsupported type for timedelta seconds component: NoneType HOT 4
- libessp.so: undefined symbol: Status HOT 3
- RANDOM.C and use of asm ("RDTSC" : "=A" (result)) FAILS on ARM HOT 4
- essp not working HOT 12
- NV11 First Run HOT 1
- .
- .
- Remove dead code HOT 1
- Can not find unit Smart Hopper on Ubuntu HOT 1
- Scenario of disabling and then enabling validator doesn't seem to work
- Segmentation fault HOT 1
- Take the banknote values from NV10 acceptor
- Use an actions queue instead of a string HOT 2
- Use Enum for constants HOT 2
- Remove repetitive return statement
- Comply with PEP8
- Can not use this Library in Windows HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from essp.