Closed dnabb closed 4 years ago
@dabbatelli Thanks for the detailed reported bug.
Could you try a "dirty" patch on your computer?
On your computer, could you modify the line: File "C:\Users\my_user\anaconda3\envs\myenv\lib\site-packages\jupyter_conda\envmanager.py", line 536
with the following patch
- pkg_info.update(json.loads(channeldata)["packages"])
+ try
+ pkg_info.update(json.loads(channeldata)["packages"])
+ except json.JSONDecodeError as err:
+ self.log.info("[jupyter_conda] Error getting {}/channeldata.json: {}".format(channel, str(e))
The error should be stopped at the server side. So in the terminal the new log information message should appears. Could you then reported here?
To give you more information, the error comes from your customized channel danabb. The extension is looking for package url and description in a file called channeldata.json stored in conda channels. But it appears to be missing in the one you specified. But the conda server is still replying the request with an HTML file and not a JSON file. And so you go your error.
Hello @fcollonval
Had to do some small adjustments but it works :) My code is now:
try:
pkg_info.update(json.loads(channeldata)["packages"])
except json.JSONDecodeError as e:
self.log.info("[jupyter_conda] Error getting {}/channeldata.json: {}".format(channel, str(e)))
No errors come up in the conda tab, but the console reports it as:
[I 16:50:38.261 NotebookApp] [jupyter_conda] Error getting https://conda.anaconda.org/danabb/channeldata.json: Expecting value: line 1 column 1 (char 0)
Thanks for trying the patch @dabbatelli and glad it fixes your error - after your corrections 😉
I am gonna push it - and some smaller adjustments - before releasing a new version
Description
Using the classical notebook, I have the
jupyter_conda
extension tab open in one browser tab while working on a notebook in another browser tab.When returning to the jupyter_conda extension tab after a while, I sometimes see the following error:
Once the error is acknowledged, everything seems to be working fine for a while, until the error appears again.
Reproduce
Expected behavior
No errors should appear.
Context
Python package version: jupyter_conda 3.2.0
General information:
Command Line Output
Browser Output