gopherdata / gophernotes

The Go kernel for Jupyter notebooks and nteract.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

External repo not working

0xstepit opened this issue · comments

commented

Hello, I'm trying to use gophernotes to test types of the following repo: https://github.com/cosmos/cosmos-sdk

I import the packages

import (
    "fmt"
    sdk "github.com/cosmos/cosmos-sdk/types"
)

and try to use:


addr := "juno1juczud9nep06t0khghvm643hf9usw45r4v7lq6"
valAddr := sdk.MustAccAddressFromBech32(addr)

On the terminal I receive the following message:

repl.go:2:12: not a type: sdk.MustAccAddressFromBech32 <*ast.SelectorExpr>

How can I solve it? thanks

Also I meet this.

repl.go:3:1: error loading package "github.com/thoas/go-funk" metadata, maybe you need to download (go get), compile (go build) and install (go install) it? can't find import: "github.com/thoas/go-funk"

commented

image

Bumping this, I have the same issue

Has anyone made any progress on this? same issue:
image

That's really strange: importing packages from the standard library is supposed to always work, and in case it fails, it's unrelated to this issue.
Maybe the cause is related to running inside WSL? It's a configuration I have never tested personally...

Commit 5514204 fixes most issues importing packages.

Some imports may still fail. Known reasons are:

  • package being imported is or depends on a package that conflicts with gophernotes dependencies.
    Example: import "github.com/cosmos/cosmos-sdk/types" currently fails with:
error loading plugin "[...]/import_1.so": plugin.Open("[...]/import_1"): 
  plugin was built with a different version of package golang.org/x/text/transform
  • on Windows, importing third-party packages is supported only inside WSL, which is itself quite untested.
    In alternative, you can use gophernotes inside Docker or inside a Linux VM.