TheThingsArchive / api

Generated code for accessing The Things Network v2 API
MIT License
12 stars 8 forks source link

Error when using router API in Go #26

Closed gusseleet closed 6 years ago

gusseleet commented 6 years ago

I'm trying to use the router api like so:

import (
    pb "github.com/TheThingsNetwork/api/router"
)

When I try to compile it I get the following error:

➜ go build
# github.com/TheThingsNetwork/api/protocol/lorawan
../github.com/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:240:37: cannot use dataRate (type "github.com/brocaar/lorawan/band".DataRate) as type "github.com/TheThingsNetwork/ttn/vendor/github.com/brocaar/lorawan/band".DataRate in argument to "github.com/TheThingsNetwork/ttn/core/types".ConvertDataRate

The same error occurs when I try to install the package:

➜ go get -u github.com/TheThingsNetwork/api/protocol/lorawan

# github.com/TheThingsNetwork/api/protocol/lorawan
../github.com/TheThingsNetwork/api/protocol/lorawan/message_conversion.go:240:37: cannot use dataRate (type "github.com/brocaar/lorawan/band".DataRate) as type "github.com/TheThingsNetwork/ttn/vendor/github.com/brocaar/lorawan/band".DataRate in argument to "github.com/TheThingsNetwork/ttn/core/types".ConvertDataRate
johanstokking commented 6 years ago

@gusseleet this is the same issue as reported on Slack, right?

How is the progress going? Any update? Can we close this?

gusseleet commented 6 years ago

Hi! I solved it. Thanks for the help.

(For others - I solved it by using the vendor file in the ttn repo).