b2 icon indicating copy to clipboard operation
b2 copied to clipboard

B2 not loading because of a missing "midas" -> "b2" rename

Open brianhempel opened this issue 2 years ago • 3 comments

After I ran...

pip3 install b2-ext

Somehow the nb extension config still produced a file with the name "midas" in it.

$ cat /Library/Frameworks/Python.framework/Versions/3.10/etc/jupyter/nbconfig/notebook.d/b2.json
{
  "load_extensions": {
    "midas/index": true
  }
}

B2 wouldn't load. But when I manually changed "midas" to "b2" in the file above, it worked.

I'd make a PR to fix this, but, despite searching for "midas" in the B2 source, I don't know where it went wrong!

brianhempel avatar Sep 15 '22 21:09 brianhempel

Hi Brian, thanks for trying to do the PR! What may have happened is that you had installed b2 at some point in the past, and when you installed the new version, it didn't get updated since the old file was already there. Could verify this by deleting the b2.json file and trying a clean install.

yifanwu avatar Sep 21 '22 16:09 yifanwu

The b2.json file in the published package says "midas".

$ pip3 uninstall b2-ext
$ cat /Library/Frameworks/Python.framework/Versions/3.10/etc/jupyter/nbconfig/notebook.d/b2.json
cat: No such file or directory
$ pip3 cache purge
$ pip3 install b2-ext -vvv
1 location(s) to search for versions of b2-ext:
* https://pypi.org/simple/b2-ext/
Fetching project page and analyzing links: https://pypi.org/simple/b2-ext/
Getting page https://pypi.org/simple/b2-ext/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/b2-ext/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/b2-ext/ HTTP/1.1" 200 373
Updating cache with response from "https://pypi.org/simple/b2-ext/"
etag object cached for 1209600 seconds
Caching due to etag
Fetched page https://pypi.org/simple/b2-ext/ as application/vnd.pypi.simple.v1+json
  Found link https://files.pythonhosted.org/packages/17/c6/2443216f6a116f00600fc491c642c0eb61dca05e3b6dd75872589bf0d930/b2-ext-0.0.4.tar.gz (from https://pypi.org/simple/b2-ext/), version: 0.0.4
  Found link https://files.pythonhosted.org/packages/01/7b/a8abdcef4e17856182195622bbf53762de364a8049c549dd1b08fd9c54ea/b2-ext-0.0.5.tar.gz (from https://pypi.org/simple/b2-ext/), version: 0.0.5
Skipping link: not a file: https://pypi.org/simple/b2-ext/
Given no hashes to check 2 links for project 'b2-ext': discarding no candidates
Collecting b2-ext
  Created temporary directory: /private/var/folders/sw/ssd2bhc911x2p56s_28rk0jc0000gn/T/pip-unpack-kzwv6i_r
  Looking up "https://files.pythonhosted.org/packages/01/7b/a8abdcef4e17856182195622bbf53762de364a8049c549dd1b08fd9c54ea/b2-ext-0.0.5.tar.gz" in the cache
  No cache entry available
  Starting new HTTPS connection (1): files.pythonhosted.org:443
  https://files.pythonhosted.org:443 "GET /packages/01/7b/a8abdcef4e17856182195622bbf53762de364a8049c549dd1b08fd9c54ea/b2-ext-0.0.5.tar.gz HTTP/1.1" 200 2046852
  Downloading b2-ext-0.0.5.tar.gz (2.0 MB)
...
  copying b2.json -> /Library/Frameworks/Python.framework/Versions/3.10/etc/jupyter/nbconfig/notebook.d
$ cat /Library/Frameworks/Python.framework/Versions/3.10/etc/jupyter/nbconfig/notebook.d/b2.json
{
  "load_extensions": {
    "midas/index": true
  }
}

brianhempel avatar Sep 21 '22 18:09 brianhempel

Sorry just saw this. I'll update PyPi and let you know when its done! Thanks for putting in the effort to look, Brian!

yifanwu avatar Nov 01 '22 17:11 yifanwu