JohnMarzulli / categorical-sectional

Version of the light-up-map that works with "individually addressable" string lights based on the WS2801.
28 stars 17 forks source link

wait_for_all_airports issue? #18

Closed Groner1661 closed 4 years ago

Groner1661 commented 5 years ago

After initial light test and list of airports loaded, controller.py seems to start to grab weather info and will then wait on a random airport for about 30 seconds. After waiting, the program seems to stop and nothing else happens. This only appears to happen when I have more than 50 airports in the airport file. Testing with included "kawo_to_kosh.json" file is successful. Testing with smaller custom airport file is successful.

Partial logs attached below:

START OF PROGRAM:

2019-03-06 04:58:19.827880 INFO: :():467: Initialize weather for all airports 2019-03-06 04:58:19.832706 INFO: get_metars:():454: get_metars([KSOP,KILM,KOAJ,KNKT,KCPC,KDYB,KCQW,KEXX,KEOE,KUKF,KXNO,KHKY,KEWN,KSAV,KETC,KSMS,KAQX,KOGB,KISO,KMEB,KIPJ,KJQF,KARW,KVUJ,KSVN,KHYW,KHRJ,KGWW,KFBG,KFFA,KSPA,KSCR,KSVH,KHBI,KAIK,KCHS,KFDW,KINT,KHFF,KGSB,KAKH,KFLO,KFQD,KRWI,KRDU,KEDE,KLUX,KSSC,KCLT,KBBP,KGSO,KRUQ,KDPL,KNBC,KMNI,KJNX,KMAO,KTBR,KSUT,KCDN,KHXD,K2J5,KJYL,KNCA,KEHO,KHVS,K7W6,KMRN,KFAY,KMQI,KUZA,KCTZ,KMMT,KBUY,KBNL,KAFP,KPGV,KHSE,KEYF,KEQY,KDCM,KCKI,KRBW,KLRO,KOCW,KMYR,KCRE,KRCZ,KCUB,KJZI,KLHZ,KAGS,KUDG,KMKS,KCAE,KMRH,KGGE]) 2019-03-06 04:58:21.066605 INFO: get_metars:():463: Attempting to reconcile METARs not returned with cache. 2019-03-06 04:58:21.069788 INFO: get_metars:():484: ~get_metars() => [KSOP,KILM,KOAJ,KNKT,KARW,KDYB,KCQW,KEXX,KEOE,KUKF,KXNO,KHKY,KEWN,KSAV,KETC,KSMS,KAQX,KOGB,KISO,KGGE,KMEB,KIPJ,KJQF,KCPC,KGSO,KSVN,KHYW,KHRJ,KGWW,KFBG,KFFA,KSPA,KSCR,KSVH,KHBI,KAIK,KCHS,KFLO,KINT,KHFF,KGSB,KAKH,KFDW,KFQD,KRWI,KRDU,KEDE,KRCZ,KSSC,KCLT,KBBP,KVUJ,KRUQ,KDPL,KNBC,KMNI,KJNX,KMAO,KTBR,KSUT,K2J5,KHXD,KJYL,KNCA,KEHO,KHVS,K7W6,KMRN,KFAY,KAGS,KUZA,KCTZ,KMMT,KBUY,KBNL,KAFP,KLHZ,KHSE,KEYF,KEQY,KDCM,KCKI,KRBW,KLRO,KOCW,KMYR,KCRE,KLUX,KCUB,KJZI,KPGV,KMQI,KUDG,KMKS,KCAE,KMRH,KCDN]

PULLS WEATHER INFO AND EVENTUALLY IT WAITS ON A SEEMINGLY RANDOM AIRPORT FOR ABOUT A MINUTE:

2019-03-06 04:59:30.820003 INFO: wait_for_all_airports:():452: Waiting on KOGB 2019-03-06 04:59:31.323654 INFO: wait_for_all_airports:():452: Waiting on KOGB 2019-03-06 04:59:31.827408 INFO: wait_for_all_airports:():452: Waiting on KOGB 2019-03-06 04:59:32.331169 INFO: wait_for_all_airports:():452: Waiting on KOGB 2019-03-06 04:59:32.834724 INFO: wait_for_all_airports:():452: Waiting on KOGB 2019-03-06 04:59:33.338372 INFO: wait_for_all_airports:():452: Waiting on KOGB 2019-03-06 04:59:33.843488 INFO: render_thread:():422: Starting rendering thread 2019-03-06 04:59:33.847454 INFO: get_civil_twilight:():156: get_civil_twilight(KSOP, 2019-03-06 04:59:33.844890, True)

Locks up here and I never see lights after the light test. It will "wait" on a different airport every time, seems completely random.

This does not happen with the included airport file "kawo_to_kosh.json", and as far as I can tell the formatting of my file is identical to yours.

JohnMarzulli commented 5 years ago

Can you send me the config file you were using?

Groner1661 commented 5 years ago

Here is the config file and the airport file I was using. The config file currently reflects the “data/kawo_to_kosh.json” call, when I switch back and forth I simply delete that and insert “data/charlotte.json”

Any input is greatly appreciated! I’m hoping I just have a character in the wrong place or something.

charlotte.json.txt

config.json.txt

On Mar 6, 2019, at 3:36 AM, John Marzulli notifications@github.com wrote:

Can you send me the config file you were using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JohnMarzulli/categorical-sectional/issues/18#issuecomment-470017408, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIy7_mr8zyFkJ-EsNcRXh2o9flS_kR-ks5vT34NgaJpZM4bgFSU.

Groner1661 commented 5 years ago

A bit more info: Through a bit of trial and error I have discovered that it seems any number of airports over 50 (neopixels 0-49) causes this. I simply deleted everything past pixel 49 and there was no issue. When I added just one more airport (neopixel 50) I get the same issue.

Groner1661 commented 5 years ago

John, have you had a chance to look into this? I know you are probably busy with other stuff (like things that pay the bills!) but I just wanted to try and reach out before I went a different route. I don’t have enough of a background in Python to troubleshoot any more than I have. Thanks for the help and the great software!

JohnMarzulli commented 5 years ago

@Groner1661 - I am taking a look at this now with my dev setup/

JohnMarzulli commented 5 years ago

@Groner1661 - I have a potential fix prepared in a new branch.

Can you try switching to the branch https://github.com/JohnMarzulli/categorical-sectional/tree/better_faa_csv_identifier_support ?

Let me know if this works.

Groner1661 commented 5 years ago

This worked! Thank you! It appears I had several airports that were not reporting METARs, some must have went offline as I was populating my list. Thank you for the help!

JohnMarzulli commented 5 years ago

Thank you for the issue report!

Just like a PIREP, you were able to help others!

I am going to let the change "soak" on my dev/personal until for a few days before merging this into master.

edwardthev commented 5 years ago

John - I'm having a similar issue... and moving over to the "faa_better" branch didn't correct it.

I have 164 lights, of which, 100 are active airports. I've checked each airport in my config file and all of them are reporting on Aviation Weather. I have checked syntax a half dozen times and just can't seem to find my problem.

Looking through my log, I'm seeing every METAR coming back as "INVALID" which is, of course, setting the color to 0,0,0. The error I THINK is relevant is pasted below...not sure if this is a different problem or related, but I'd appreciate any help!

2019-03-14 23:59:28,675 - weathermap - WARNING - 2019-03-15 03:59:28.675550 WARN: get_metars:():502: get_metars EX:<urlopen error getrandom() initialization failed. (_ssl.c:720)>