Code Monkey home page Code Monkey logo

Comments (6)

rms5566 avatar rms5566 commented on July 1, 2024

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.

BrainOnFire avatar BrainOnFire commented on July 1, 2024

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.

rms5566 avatar rms5566 commented on July 1, 2024

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.

BrainOnFire avatar BrainOnFire commented on July 1, 2024

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.

rms5566 avatar rms5566 commented on July 1, 2024

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.

BrainOnFire avatar BrainOnFire commented on July 1, 2024

Thanks for the help. I will certainly look into it.

from essp.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.