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

Cannot import project as library #94

Closed
csaade opened this issue Feb 8, 2021 · 4 comments
Closed

Cannot import project as library #94

csaade opened this issue Feb 8, 2021 · 4 comments
Labels

Comments

@csaade
Copy link

csaade commented Feb 8, 2021

Hello,

I am trying to import this project as a library by running the command
go get -u github.com/nlpodyssey/spago
(as instructed in the readme)

I am getting the following error:
cannot find package "github.com/dgraph-io/badger/v2"

Anyone else got this error?

@matteo-grella
Copy link
Member

matteo-grella commented Feb 8, 2021

Hi @csaade,

Thanks for pointing out this problem.

It appears that the reference to badger v2 has changed or removed. Very odd indeed.

In any case, I updated the dependency to version v3 and everything seems to work smoothly now on the main branch.

Can you please verify and let me know?

@csaade
Copy link
Author

csaade commented Feb 9, 2021

Hey @matteo-grella,

Thanks for your help - it's working well on my end now! However, I'm still facing some compilation issues in the huggingfaceimporter/clientutils code mostly. Here are the errors:

`../go/src/github.com/nlpodyssey/spago/cmd/huggingfaceimporter/internal/importer.go:62:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/nlpodyssey/spago/cmd/huggingfaceimporter/internal/importer.go:66:4: unknown field 'EnvVar' in struct literal of type cli.StringFlag
../go/src/github.com/nlpodyssey/spago/cmd/huggingfaceimporter/internal/importer.go:69:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/nlpodyssey/spago/cmd/huggingfaceimporter/internal/importer.go:72:4: unknown field 'EnvVar' in struct literal of type cli.StringFlag
../go/src/github.com/nlpodyssey/spago/cmd/huggingfaceimporter/internal/importer.go:76:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/nlpodyssey/spago/cmd/huggingfaceimporter/internal/importer.go:79:4: unknown field 'EnvVar' in struct literal of type cli.BoolFlag

github.com/nlpodyssey/spago/cmd/clientutils
../go/src/github.com/nlpodyssey/spago/cmd/clientutils/client.go:24:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/nlpodyssey/spago/cmd/clientutils/client.go:29:15: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
../go/src/github.com/nlpodyssey/spago/cmd/clientutils/client.go:34:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
`

Am I doing something wrong?

@matteo-grella
Copy link
Member

I'm not sure.

You couldn't report here the sequence of operations and commands that led to this error, could you?

@matteo-grella matteo-grella added bug Something isn't working solved and removed bug Something isn't working labels Feb 10, 2021
@matteo-grella
Copy link
Member

Solved by updating the module github.com/urfave/cli to v2.

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

2 participants