Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on starting SHARPpy binary 1.4.0 #193

Open
georgephillips1 opened this issue Mar 10, 2020 · 25 comments
Open

Error on starting SHARPpy binary 1.4.0 #193

georgephillips1 opened this issue Mar 10, 2020 · 25 comments
Labels

Comments

@georgephillips1
Copy link

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.

@wblumberg
Copy link
Contributor

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

@georgephillips1
Copy link
Author

georgephillips1 commented Mar 10, 2020 via email

@wblumberg
Copy link
Contributor

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.

@rpdale
Copy link

rpdale commented Mar 10, 2020

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 :)

@wblumberg
Copy link
Contributor

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

@wblumberg
Copy link
Contributor

wblumberg commented Mar 10, 2020

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
Copy link
Contributor

wblumberg commented Mar 10, 2020

Looks related to this: pypa/setuptools#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.

@cturnbull22
Copy link

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.

@wblumberg
Copy link
Contributor

wblumberg commented Mar 10, 2020

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
Copy link
Contributor

More documentation -
pyinstaller/pyinstaller#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
Copy link
Contributor

wblumberg commented Mar 11, 2020

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.

@dziban303
Copy link

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.

@TylerMNWX
Copy link

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

@TheWisestWolf
Copy link

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)

@malcolmmaas
Copy link

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

@ghost
Copy link

ghost commented May 1, 2020

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

@skkimball
Copy link

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

@MichalPiotrowski0786
Copy link

MichalPiotrowski0786 commented Jan 2, 2021

Still have same issue as @Zazzmatazz

@potvinp
Copy link

potvinp commented Sep 14, 2021

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.

@skovic
Copy link

skovic commented Nov 7, 2021

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.

@dziban303
Copy link

dziban303 commented Nov 7, 2021 via email

@rpdale
Copy link

rpdale commented Nov 8, 2021 via email

@dziban303
Copy link

dziban303 commented Nov 8, 2021

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.

@skovic
Copy link

skovic commented Nov 8, 2021

@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

@daniwest3
Copy link

image
when i open the fix it gives me this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests