I am currently involved in a student project which is to turn string GPS coordinates into a GPS tracker. This is my current work: First, the UDP data is shared through a LAN (No internet available) therefore, I get it with an UDP socket. The frame: (DDS coordinates)


Then I translate it in DD coordinates so that I can show it on the map using this code:


With 1 mark it works very well. But I receive new frame every second and I'd like to move this mark simultaneously. That's why I tried this:

#I assumed that the first point is already shown
while n<3600:

But when I run this, Qgis is frozen until the last mark appears while I expect to see one mark after another and to run QGIS normally. How can I fix it? --QGIS 2.14, Python 2.7, Windows 7 32bits, no internet--

  • 1
    Is there a specific reason you are working with QGIS 2.14?
    – Erik
    Aug 14, 2019 at 11:56
  • Yes, in fact this project is for an aeroclub which uses QGIS 2.14. Do you think it causes difficulties?
    – MiddleC
    Aug 14, 2019 at 12:11
  • I have no idea, I just know that newer versions of QGIS tend to incorporate more/better working functionalities.
    – Erik
    Aug 14, 2019 at 12:22

1 Answer 1


Maybe your can try the try and except condition to make sure where things goes wrong. Something like this :

while n<3600 :
try :
your code
whatever condition you want to test

At least if it still doesn't work it should not freeze anymore.

  • Thanks for your advice. I tried it but it still doesn't work. So, I tried with a list of coordinates adding time.sleep(1) and it froze again. I concluded that my issue is not specifically linked to my way to get data. Have you any idea where I'm doing wrong?
    – MiddleC
    Aug 26, 2019 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.