SHARPpy icon indicating copy to clipboard operation
SHARPpy copied to clipboard

Error on starting SHARPpy binary 1.4.0

Open georgephillips1 opened this issue 4 years ago • 25 comments

Downloading the latest SHARPpy binary in SHARPpy-win-64.zip from https://github.com/sharppy/SHARPpy/releases/tag/v1.4.0, and starting it up, I see the following error and no SHARPpy windows will come up.

image

I deleted the .sharppy directory in my user profile before trying to start the executable.

georgephillips1 avatar Mar 10 '20 03:03 georgephillips1

Ugh. I'm not sure what's going on there. Thanks for checking this out! Does v1.4.0b1 work?

wblumberg avatar Mar 10 '20 03:03 wblumberg

Yes, it did.

I don't have Anaconda Python 3.7 on my system. I'll try to install that and then install SHARPpy via package manager to see if that will do it.

George

On Mon, Mar 9, 2020 at 8:05 PM Greg Blumberg [email protected] wrote:

Ugh. I'm not sure what's going on there. Thanks for checking this out! Does v1.4.0b1 work?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sharppy/SHARPpy/issues/193?email_source=notifications&email_token=AC37WNRRCD7EKWJGONHC2BLRGW37NA5CNFSM4LEVYTCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOJ2EPA#issuecomment-596877884, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC37WNXXTOUZCL46M5WNJH3RGW37NANCNFSM4LEVYTCA .

georgephillips1 avatar Mar 10 '20 03:03 georgephillips1

Hmm. Wait on checking the package manager. The upload to the SHARPpy channel wasn't successful and we haven't updated the conda-forge package yet.

wblumberg avatar Mar 10 '20 03:03 wblumberg

Same error for me after removing .sharppy too. I saved the old .exe and it did give me a message about the new version so there's that :)

rpdale avatar Mar 10 '20 13:03 rpdale

Okay. v1.4.0 should be building on conda-forge as I write this.

wblumberg avatar Mar 10 '20 13:03 wblumberg

I suggest all use v1.4.0b1 until the binaries are fixed. It's not clear what needs to be fixed yet, and that version isn't very different from v1.4.0

wblumberg avatar Mar 10 '20 14:03 wblumberg

Looks related to this: https://github.com/pypa/setuptools/issues/1963

From MacOS:

(py37) Ws-MacBook-Pro:~ blumberg$ /Users/blumberg/Downloads/SHARPpy.app/Contents/MacOS/SHARPpy ; exit; [49283] PyInstaller Bootloader 3.x [49283] LOADER: executable is /Users/blumberg/Downloads/SHARPpy.app/Contents/MacOS/SHARPpy [49283] LOADER: homepath is /Users/blumberg/Downloads/SHARPpy.app/Contents/MacOS [49283] LOADER: _MEIPASS2 is NULL [49283] LOADER: archivename is /Users/blumberg/Downloads/SHARPpy.app/Contents/MacOS/SHARPpy [49283] LOADER: Extracting binaries [49283] LOADER: Executing self as child [49283] LOADER: set _MEIPASS2 to /var/folders/y8/5rjc4_bd6fl7k4p24y066xdw0000gn/T/_MEIHeom14 [49283] LOADER [ARGV_EMU]: AppleEvent - processing... [49283] LOADER [ARGV_EMU]: AppleEvent - installed handler. [49283] LOADER [ARGV_EMU]: AppleEvent - calling ReceiveNextEvent [49283] LOADER [ARGV_EMU]: ReceiveNextEvent got an event[49283] LOADER [ARGV_EMU]: processing events failed[49283] LOADER [ARGV_EMU]: Out of the event loop.[49283] LOADER: Registering signal handlers [49284] PyInstaller Bootloader 3.x [49284] LOADER: executable is /Users/blumberg/Downloads/SHARPpy.app/Contents/MacOS/SHARPpy [49284] LOADER: homepath is /Users/blumberg/Downloads/SHARPpy.app/Contents/MacOS [49284] LOADER: _MEIPASS2 is /var/folders/y8/5rjc4_bd6fl7k4p24y066xdw0000gn/T/_MEIHeom14 [49284] LOADER: archivename is /Users/blumberg/Downloads/SHARPpy.app/Contents/MacOS/SHARPpy [49284] LOADER: Already in the child - running user's code. [49284] LOADER: Python library: /var/folders/y8/5rjc4_bd6fl7k4p24y066xdw0000gn/T/_MEIHeom14/libpython3.6m.dylib [49284] LOADER: Loaded functions from Python library. [49284] LOADER: Manipulating environment (sys.path, sys.prefix) [49284] LOADER: sys.prefix is /var/folders/y8/5rjc4_bd6fl7k4p24y066xdw0000gn/T/_MEIHeom14 [49284] LOADER: Pre-init sys.path is /var/folders/y8/5rjc4_bd6fl7k4p24y066xdw0000gn/T/_MEIHeom14/base_library.zip:/var/folders/y8/5rjc4_bd6fl7k4p24y066xdw0000gn/T/_MEIHeom14 [49284] LOADER: Setting runtime options [49284] LOADER: Initializing python [49284] LOADER: Overriding Python's sys.path [49284] LOADER: Post-init sys.path is /var/folders/y8/5rjc4_bd6fl7k4p24y066xdw0000gn/T/_MEIHeom14/base_library.zip:/var/folders/y8/5rjc4_bd6fl7k4p24y066xdw0000gn/T/_MEIHeom14 [49284] LOADER: Setting sys.argv [49284] LOADER: setting sys._MEIPASS [49284] LOADER: importing modules from CArchive [49284] LOADER: extracted struct [49284] LOADER: callfunction returned... [49284] LOADER: extracted pyimod01_os_path [49284] LOADER: callfunction returned... [49284] LOADER: extracted pyimod02_archive [49284] LOADER: callfunction returned... [49284] LOADER: extracted pyimod03_importers [49284] LOADER: callfunction returned... [49284] LOADER: Installing PYZ archive with Python modules. [49284] LOADER: PYZ archive: PYZ-00.pyz [49284] LOADER: Running pyiboot01_bootstrap.py [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49284] LOADER: Running pyi_rth_pkgres.py [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 [49283] LOADER: Forwarding signal 28 to child pid 49284 Traceback (most recent call last): File "site-packages/PyInstaller/loader/rthooks/pyi_rth_pkgres.py", line 11, in File "/usr/local/miniconda/envs/devel/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 627, in exec_module File "site-packages/pkg_resources/init.py", line 86, in ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [49284] Failed to execute script pyi_rth_pkgres [49284] LOADER: OK. [49284] LOADER: Cleaning up Python interpreter. [49283] LOADER: Restoring signal handlers [49283] LOADER: freeing args [49283] LOADER: returning child exit status 255 [49283] LOADER: Back to parent (RC: 255) [49283] LOADER: Doing cleanup [49283] LOADER: Freeing archive status for /Users/blumberg/Downloads/SHARPpy.app/Contents/MacOS/SHARPpy logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. Deleting expired sessions...78 completed.

wblumberg avatar Mar 10 '20 14:03 wblumberg

sharppy-launch.txt sharppy-console_logs.txt

Sharppy is crashing at launch on macOS Catalina. While looking at the console, I noticed the following during the attempted launch: "HARPpy[3532]: Failed to execute script pyi_rth_pkgres" "SHARPpy[3531]: LOADER [ARGV_EMU]: processing events failed" "com.apple.xpc.launchd[1] (SHARPpy.4156[3531]): Service exited with abnormal code: 255"

In the second file, it seems like there is a problem with notarization / file signing. I don't know if that is related or not, but that's what I see in the console every time I try to launch Sharppy 1.4.0 on macOS Catalina 10.15.3.

cturnbull22 avatar Mar 10 '20 18:03 cturnbull22

Hi @cturnbull22 . Thank you for posing the console log output. I strongly suspect the "Failed to execute script pyi_rth_pkgres" is a consequence of the above issue I linked to with setup tools. I'll try to address this once I get home this evening.

With respect to the notarization and file signing, there's not much progress I've been able to make on that. It would be great if we could codesign the macOS binary, but I haven't found out a clean way to do it and am not too keen on adding more steps to the binary generation with continuous integration. Last I read we had to be registered with Apple and there was a fee.

However, if someone wants to do the research to figure out how we could sign the SHARPpy app (and open up a separate issue with the steps), it might help get things going!

wblumberg avatar Mar 10 '20 21:03 wblumberg

More documentation - https://github.com/pyinstaller/pyinstaller/issues/4672 http://quabr.com/60185857/errors-while-running-kivy-after-pyinstaller-pyi-rth-pkgres-wordcount-kv-unabl

Testing a solution where pkg_resources.py2_warn is included as a hidden import in the .spec files.

wblumberg avatar Mar 11 '20 13:03 wblumberg

Was able to get a macOS binary to build and launch with this solution - got a strange datetime related error in the console upon initial launch though. Will upload the two binaries for review once they get finished downloading. Binaries will have the version v1.4.0+1 for the time being.

wblumberg avatar Mar 11 '20 13:03 wblumberg

My error message is slightly different.

image

It doesn't write anything to the .sharppy folder; is there a command line switch to force it to output a log file? v1.4.0β1 does work.

dziban303 avatar Mar 15 '20 17:03 dziban303

Sorry for bumping but I am also having the same issue with the most recent executable, the previous one works just fine however.

TylerMNWX avatar Apr 13 '20 10:04 TylerMNWX

It's been a while with no update on the Window's binary. Has a fix been made, is it in progress, etc? I ask because current versions are becoming growingly cumbersome to use and it'd be very helpful to have the most recent, stable version with legitimate access to sounding data in models and obs (1.4.01b can't do this and 1.3.0 just can't load most model data)

TheWisestWolf avatar Apr 26 '20 03:04 TheWisestWolf

When I run sharppy for the first time it works fine, but after closing and reopening Anaconda and trying to run it again (through the terminal) I get this error: image

malcolmmaas avatar Apr 26 '20 16:04 malcolmmaas

My error is different still. SHARPpy_2020-05-01_11-36-37

Interestingly, SHARPpy isn't even generating a log file.

Windows 10 Pro Test Mode Build 18362.19h1_release.190318-1202 using SHARPpy 1.4.0 x64

ghost avatar May 01 '20 15:05 ghost

Has the above issue (Failed to execute script pyi_rth_certifi) been resolved for Windows yet?

skkimball avatar Dec 11 '20 15:12 skkimball

Still have same issue as @Zazzmatazz

MichalPiotrowski0786 avatar Jan 02 '21 19:01 MichalPiotrowski0786

My error message is slightly different.

image

It doesn't write anything to the .sharppy folder; is there a command line switch to force it to output a log file? v1.4.0β1 does work.

I'm receiving this exact same issue, and fear that sharppy is no longer a priority for the developers as there has been no activity on this repo in almost 2 years now. v1.3.0 works no problem, but the latest versions don't work whasoever.

potvinp avatar Sep 14 '21 16:09 potvinp

I was also encountering the "Failed to execute script pyi_rth_certifi" problem on my Windows 10 system using the v1.4.0 binary, so I decided to see if I could fix the problem on my own. I was able to build my own binary using pyinstaller in the anaconda "devel" environment using a slightly-modified version of the "SHARPpy-win7-64.spec" file.

Regarding the root cause, it seems that something was probably amiss in the build environment used to create the v1.4.0 executable or maybe pyinstaller pulled in a library from the system that is incompatible with recent Windows 10 updates.

I have uploaded a copy of the working Windows binary to my forked repo here:

https://github.com/skovic/SHARPpy/releases/tag/v1.4.0-fixed

The binary is in the SHARPpy-win-64.zip file, and it contains the latest from the master branch.

Hopefully, this helps out others who wish to run SHARPpy in Windows.

skovic avatar Nov 07 '21 20:11 skovic

You're magnificent. I'm eager to give it a try.

dziban303 avatar Nov 07 '21 21:11 dziban303

Works great for me – thanks! From: Stephen KovicSent: Sunday, November 7, 2021 3:58 PMTo: sharppy/SHARPpyCc: rpdale; CommentSubject: Re: [sharppy/SHARPpy] Error on starting SHARPpy binary 1.4.0 (#193) I was also encountering the "Failed to execute script pyi_rth_certifi" problem on my Windows 10 system using the v1.4.0 binary, so I decided to see if I could fix the problem on my own. I was able to build my own binary using pyinstaller in the anaconda "devel" environment using a slightly-modified version of the "SHARPpy-win7-64.spec" file.Regarding the root cause, it seems that something was probably amiss in the build environment used to create the v1.4.0 executable or maybe pyinstaller pulled in a library from the system that is incompatible with recent Windows 10 updates.I have uploaded a copy of the working Windows binary to my forked repo here:https://github.com/skovic/SHARPpy/releases/tag/v1.4.0-fixedThe binary is in the SHARPpy-win-64.zip file, and it contains the latest from the master branch.Hopefully, this helps out others who wish to run SHARPpy in Windows.—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.  

rpdale avatar Nov 08 '21 15:11 rpdale

I was also encountering the "Failed to execute script pyi_rth_certifi" problem on my Windows 10 system using the v1.4.0 binary, so I decided to see if I could fix the problem on my own. I was able to build my own binary using pyinstaller in the anaconda "devel" environment using a slightly-modified version of the "SHARPpy-win7-64.spec" file.

Regarding the root cause, it seems that something was probably amiss in the build environment used to create the v1.4.0 executable or maybe pyinstaller pulled in a library from the system that is incompatible with recent Windows 10 updates.

I have uploaded a copy of the working Windows binary to my forked repo here:

https://github.com/skovic/SHARPpy/releases/tag/v1.4.0-fixed

The binary is in the SHARPpy-win-64.zip file, and it contains the latest from the master branch.

Hopefully, this helps out others who wish to run SHARPpy in Windows.

SHARPpy v1.4.0+10.g19175269.dirty Andover Crash time: 2021-11-08 14:50:08.128345 Traceback (most recent call last): File "full_gui.py", line 136, in doCrasher File "full_gui.py", line 601, in complete_name File "datasources\data_source.py", line 375, in getForecastHours File "datasources\data_source.py", line 350, in _get File "datasources\data_source.py", line 167, in getForecastHours TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Sigh. Yeah I can't get any profiles with the skovik's rebuild. And the Preferences panel won't open at all.

dziban303 avatar Nov 08 '21 20:11 dziban303

@dziban303 The observed and model soundings seem to work for me. I was able to reproduce your problem for observed soundings by removing the attribute named first from the time element in the Observed datasource and its SPC outlet. These changes were made in .sharppy/datasources/standard.xml.

I looked at older versions of standard.xml, and the older versions do not have a first attribute in any of the time elements.

So what I think is happening is that you have a .sharppy folder from an older install of SHARPpy that contains incompatible versions of the config files. To fix it, try deleting the existing .sharppy folder in your home directory and then run the executable again. The .sharppy folder should be recreated with correct versions of the config files.

I have created a new version of the build with a fix for the preferences panel not opening. You can download it here:

https://github.com/skovic/SHARPpy/releases/tag/v1.4.0-fixed.1

skovic avatar Nov 08 '21 23:11 skovic

image when i open the fix it gives me this

daniwest3 avatar Jan 14 '24 03:01 daniwest3