Jul-25-2017, 05:42 AM
I'm basically putting two pieces of code together. The first one (step 1) gets your location based on your ip address. I have it turn the location it gets into variables that I can put into other things. (Loc_C for the city it outputs, Loc_S for the state.) This part works perfectly! But you can't get the weather with yweather using that kind of location data, so the script has to use the "fetch_woeid" function. (This is step 2.) I use the variables from step 1 as the location data of the location for which I'm fetching the woeid, and it returns a string of numbers for me to put into the module's other commands. Now up until this point, everything works just peachy keen, and if I directly (and unfortunately manually) input the woeid into the "fetch_weather" command, everything continues to work. The problem is when I try and equate the woeid step 2 returns into a variable, in order to automate the process. (If I can just say "this returned bit of data, the woeid = wid" and have the fetch_weather command fetch "wid" instead of an actual woeid, I won't need to type the thing out every time, and I can just make it part of the script.) And, in theory at least, this should work, because it's almost exactly what I did in steps 1 and 2, with the loc_c and loc_s variables. Except it doesn't. And I don't get any helpful error messages, the whole thing just stops firing. If I want to use my terminal again I have to ctrl-z to end the program. Is that more helpful? Like I said, I'm super new to this, so I don't 100% know what I'm doing/talking about!