sharppy / SHARPpy

Sounding/Hodograph Analysis and Research Program in Python
https://sharppy.github.io/SHARPpy/index.html
Other
216 stars 112 forks source link

full_gui.py will not start #65

Closed johnrobertlawson closed 8 years ago

johnrobertlawson commented 9 years ago

Hi,

I'm filing this issue on behalf of someone else. He's running 10.8.5 OS X and getting the following error:

Traceback (most recent call last):
  File "full_gui.py", line 633, in <module>
    win = MainWindow()
  File "full_gui.py", line 187, in __init__
    self.run = [ t for t in self.data_sources[self.model].getAvailableTimes() if t.hour in [0, 12] ][-1]
KeyError: 'Observed'

Thanks, John

wblumberg commented 9 years ago

Hey John...what version of SHARPpy is he running (when did he download it?)

johnrobertlawson commented 9 years ago

Hi,

He just downloaded it an hour ago.

I can reproduce an identical error on my Mac running 10.10.3 (also using the latest version from 30 min ago).

John

wblumberg commented 9 years ago

Okay. We can't investigate this further until this week is up. Exams for us.

johnrobertlawson commented 9 years ago

I have no clue about Python eggs, but the problem in this case (might be something to do with the way we installed SHARPpy, Anaconda, or homebrew conflicts?) is that ds_dir in datasources.data_source.loadDataSources() , within the egg, doesn't see the example.xml file, as it only exists in the Git repo datasources folder.

Hope this helps when you're finished with the exams (good luck!).

tsupinie commented 9 years ago

I'd bet it's that the SPC site is in the middle of posting profiles at a new time. It happens when they have a link to the page for a particular time on the main sounding page, but don't actually have that page up yet.

Try again now; I was able to pull it up.

On Wed, May 6, 2015 at 2:38 PM, Greg Blumberg notifications@github.com wrote:

Okay. We can't investigate this further until this week is up. Exams for us.

— Reply to this email directly or view it on GitHub https://github.com/sharppy/SHARPpy/issues/65#issuecomment-99582655.

johnrobertlawson commented 9 years ago

No good, I'm afraid; same issue.

tsupinie commented 9 years ago

Okay, now that I have a clear(er) head (exam over and no imminent severe weather).

My suspicion yesterday was wrong. It's acting like it can't find your standard.xml file (containing the definitions for all the data sources). When you download the package, there should be full_gui.py in the runsharp/ directory. You need to cd to the runsharp/ directory and run it from there. Additionally, it looks for standard.xml in the ../datasources/ directory (relative to runsharp/), so standard.xml should be in there.

Let me know if that helps.

That is something that we plan to clean up in a new version; we just kind of went with what worked at the time.

johnrobertlawson commented 9 years ago

Yeah see my earlier reply - the .XML doesn't appear in the 'egg' that is the location of the load method associated with data_sources. I can copy it manually but I suppose that is a band-aid solution - I wonder if this is a Mac-wide or version-wide issue for first time installers?

John

On Thu, 7 May 2015 11:39 am Tim Supinie notifications@github.com wrote:

Okay, now that I have a clear(er) head (exam over and no imminent severe weather).

My suspicion yesterday was wrong. It's acting like it can't find your standard.xml file (containing the definitions for all the data sources). When you download the package, there should be full_gui.py in the runsharp/ directory. You need to cd to the runsharp/ directory and run it from there. Additionally, it looks for standard.xml in the ../datasources/ directory (relative to runsharp/), so standard.xml should be in there.

Let me know if that helps.

That is something that we plan to clean up in a new version; we just kind of went with what worked at the time.

— Reply to this email directly or view it on GitHub https://github.com/sharppy/SHARPpy/issues/65#issuecomment-99932730.

wblumberg commented 9 years ago

Hi John,

We've just been working with the latest version, and we're a little confused as this issue hasn't been reported by any other users (in any OSes) and we haven't been able to reproduce it. We've been able to get full_gui.py to run with this latest version, and we've never needed to consider the 'egg' files in any of our development or operational environments, so you probably don't need to either. Could you tell us the command you are using and the directory you are running it in (i.e. pwd)? Explicit output from the command line would be helpful here.

Thanks,

Greg

johnrobertlawson commented 9 years ago

See the first post for command line output from python full_gui.py. I copied the runsharp folder to another directory within /Users/<username>/ and ran it in there. The git-cloned repo is elsewhere but on the PYTHONPATH.

While I was debugging via pdb, here's a interesting snippet:

(Pdb) data_source
<module 'datasources.data_source' from '/Users/johnlawson/anaconda/envs/python2/lib/python2.7/site-packages/SHARPpy-1.2.0-py2.7.egg/datasources/data_source.py'>

One directory up from there, there's no .xml file to be found (where data_source.loadDataSources() is looking).

wblumberg commented 9 years ago

Hi John. I know what the problem is now. There seems to be some text in the README that says you should copy the runsharp folder somewhere else. This is the problem, as this will destroy the absolute paths from the full_gui.py program to the data sources. As Tim mentions above, we are cleaning that up eventually. Don't copy the runsharp folder anywhere. Instead run full_gui.py straight from the runsharp folder that came with the SHARPpy download. In my example below, my SHARPpy download is in the directory "SHARPpy-master". You should have no problem running it then.

screen shot 2015-05-08 at 10 38 27 am