Coder Social home page Coder Social logo

python 3 versus 2 about opc-n3_python HOT 2 OPEN

jarvissan22 avatar jarvissan22 commented on August 15, 2024
python 3 versus 2

from opc-n3_python.

Comments (2)

JarvisSan22 avatar JarvisSan22 commented on August 15, 2024

Hi kyussinchains

Thanks for your message.
I checked over the code for the GPS and there was few python 2 formatted prints I have updated, but also think the issue may come from the "run" functions in GPS2.py

def run(self):
global gpsd
while gpsp.running:
gpsd.next() #this will continue to loop and grab EACH set of gpsd info to clear the buffer

After a quick check, the issue may by the .next() command not working in python3 the same was as python2
https://sebastianraschka.com/Articles/2014_python_2_3_key_diff.html

Sadly I currently don't have an RPI3 at hand to test the code. Could you please test if its this is the cause?

kind regards
Daniel Jarvis

from opc-n3_python.

kyussinchains avatar kyussinchains commented on August 15, 2024

Hi Daniel,

I tried the new version and I am running up against the same error, the issue seems to be that there is no gps header to import under python 3, so the main start.py code runs under python 3 (I get various struct.unpack errors under python 2) but the GPS code runs under python 2, it seems both will run independently, but not together.... have you managed to get the code running in GPS mode during your testing?

best regards
Simon

from opc-n3_python.

Related Issues (4)

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.