SHARPpy icon indicating copy to clipboard operation
SHARPpy copied to clipboard

[BUG] SHARPpy plot crashes

Open Linuxuser1234 opened this issue 1 year ago • 6 comments

when i click on the station and select Generate Profiles the graph crashes and outputs this error `There was an exception: Exception: No outlet found with the requested profile!

Well, this is embarrassing. SHARPpy broke. This is probably due to an issue with one of the data source servers, but if it keeps happening, send the detailed information to the developers.

Detailed Information: SHARPpy v1.4.0 Andover Crash time: 2024-03-25 11:56:55.582421 Traceback (most recent call last): File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\datasources\data_source.py", line 365, in _getOutletWithProfile outlet = use_outlets[outlet_num] ~~~~~~~~~~~^^^^^^^^^^^^ IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\runsharp\full_gui.py", line 608, in complete_name self.skewApp(ntry=n_tries) File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\runsharp\full_gui.py", line 771, in skewApp raise exc File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\sutils\async_threads.py", line 122, in run ret_val = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\runsharp\full_gui.py", line 835, in loadData decoder, url = data_source.getDecoderAndURL(loc, run, outlet_num=ntry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\datasources\data_source.py", line 436, in getDecoderAndURL outlet = self._getOutletWithProfile(stn, cycle_dt, outlet_num=outlet_num) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\datasources\data_source.py", line 367, in _getOutletWithProfile raise DataSourceError() datasources.data_source.DataSourceError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\runsharp\full_gui.py", line 136, in doCrasher ret = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\runsharp\full_gui.py", line 614, in complete_name raise IOError( OSError: No outlet found with the requested profile!`

Linuxuser1234 avatar Mar 25 '24 16:03 Linuxuser1234

I was having this issue as well. I think something in Anaconda updated which broke SHARPpy because installing everything without Anaconda works just fine. I'll look into it some more and see if I can't figure out the issue.

collin-volk avatar Mar 25 '24 18:03 collin-volk

It doesn't appear that Anaconda is actually the problem, as I just did a fresh install on my PC without it and I am getting the same issue. For some reason it's running just fine on a different machine though so I don't know what the real issue is. More investigation is needed.

collin-volk avatar Mar 25 '24 22:03 collin-volk

Looks like the issue is with numpy. Not sure exactly what changed yet, but in the meantime, version 1.22.3 appears to work just fine. I'm not super familiar with Anaconda, but I believe you can use the command conda install numpy=1.22.3 to install it.

collin-volk avatar Mar 25 '24 22:03 collin-volk

@collin-volk I downgraded to numpy 1.22.3 but when i run sharppy.exe in the anaconda prompy i get this error i didnt get this before i downgraded numpy ` Traceback (most recent call last): File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 793, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 1099, in _validate_conn conn.connect() File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connection.py", line 653, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connection.py", line 806, in ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\util\ssl.py", line 465, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\util\ssl.py", line 509, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\ssl.py", line 1104, in _create self.do_handshake() File "D:\Anaconda\envs\sharppy-env\Lib\ssl.py", line 1382, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\requests\adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 847, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\util\retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\util\util.py", line 38, in reraise raise value.with_traceback(tb) File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 793, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 491, in _make_request raise new_e File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connectionpool.py", line 1099, in _validate_conn conn.connect() File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connection.py", line 653, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\connection.py", line 806, in ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( ^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\util\ssl.py", line 465, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\urllib3\util\ssl.py", line 509, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\ssl.py", line 1104, in _create self.do_handshake() File "D:\Anaconda\envs\sharppy-env\Lib\ssl.py", line 1382, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Anaconda\envs\sharppy-env\Scripts\sharppy-script.py", line 10, in sys.exit(main()) ^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\runsharp\full_gui.py", line 1209, in main latest = check_latest() ^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\sutils\ver_updates.py", line 43, in check_latest data = get_latest_ver() ^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\sutils\ver_updates.py", line 17, in get_latest_ver response = requests.get(url) ^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\envs\sharppy-env\Lib\site-packages\requests\adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)) `

Linuxuser1234 avatar Mar 26 '24 12:03 Linuxuser1234

Looks like the version of SHARPpy that gets downloaded from conda-forge is way behind where the repo is at right now, and part of what was causing an exception was code that was commented out specifically due to Windows bugs. I would try uninstalling SHARPpy, then reinstall it using the sources from git rather than doing conda install. Instructions for how to do that are in the readme. Prior to doing so, I would change the environment.yml so instead of numpy>=1.15 it has numpy=1.22.3 so it doesn't get the newest version of numpy again.

collin-volk avatar Mar 26 '24 14:03 collin-volk

I am having similar issue to this post and #256 but nothing listed above or in that post has worked. Please see error below. Does anyone have a SHARPpy environment that is working they can share (for Windows/Anaconda)

`OOPS: PySide2.QtGui.QFont.init(): unsupported keyword 'bold' There was an exception: Exception: No outlet found with the requested profile!

Well, this is embarrassing. SHARPpy broke. This is probably due to an issue with one of the data source servers, but if it keeps happening, send the detailed information to the developers.

Detailed Information: SHARPpy v1.4.0 Andover Crash time: 2024-07-09 11:39:26.255721 Traceback (most recent call last): File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\datasources\data_source.py", line 365, in _getOutletWithProfile outlet = use_outlets[outlet_num] IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\runsharp\full_gui.py", line 608, in complete_name self.skewApp(ntry=n_tries) File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\runsharp\full_gui.py", line 771, in skewApp raise exc File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\sutils\async_threads.py", line 122, in run ret_val = func(*args, **kwargs) File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\runsharp\full_gui.py", line 835, in loadData decoder, url = data_source.getDecoderAndURL(loc, run, outlet_num=ntry) File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\datasources\data_source.py", line 436, in getDecoderAndURL outlet = self._getOutletWithProfile(stn, cycle_dt, outlet_num=outlet_num) File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\datasources\data_source.py", line 367, in _getOutletWithProfile raise DataSourceError() datasources.data_source.DataSourceError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\runsharp\full_gui.py", line 136, in doCrasher ret = func(*args, **kwargs) File "C:\Users\chrissy.rogers.tm.conda\envs\skewT\lib\site-packages\runsharp\full_gui.py", line 615, in complete_name "No outlet found with the requested profile!") OSError: No outlet found with the requested profile!`

cmw1229 avatar Jul 22 '24 16:07 cmw1229