Git Product home page Git Product logo

go-whosonfirst-api's Issues

strconv.Atoi: parsing “” error

wof-api -param api_key=mapzen-XXXXXX -param method=whosonfirst.places.getRandom -raw -param format=csv
Failed to call ‘whosonfirst.places.getRandom’ because strconv.Atoi: parsing “”: invalid syntax

Handle "503 Slow Down" errors

For example:

2017/07/17 21:58:14 Failed to retrieve https://whosonfirst.mapzen.com/data/219/309/339/219309339.geojson because 503 Slow Down

Easy enough to trigger with the -async and -geojson(-ls) flags

deprecate -geojson flag

Leave it in place but issue a warning, prefer -feature-collection instead since that's what it is and will be in sync with go-whosonfirst-index

Remove TTS writer

This shouldn't be part of core and causes the entirety of the AWS Go libraries to be vendored.

Invalid memory address or nil pointer dereference - parsing MapzenResponse

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x64a344]

goroutine 1 [running]:
github.com/whosonfirst/go-whosonfirst-api/client.(*HTTPClient).ExecuteMethod(0xc420625f20, 0x7fff568b882d, 0x19, 0xc4205729c8, 0x0, 0x0, 0x0, 0x0)
        /usr/local/mapzen/go-whosonfirst-api/src/github.com/whosonfirst/go-whosonfirst-api/client/http.go:96 +0x6d4
github.com/whosonfirst/go-whosonfirst-api/client.(*HTTPClient).ExecuteMethodPaginated(0xc420625f20, 0x7fff568b882d, 0x19, 0xc42000e080, 0xc42015c300, 0xc420108cf0, 0x0)
        /usr/local/mapzen/go-whosonfirst-api/src/github.com/whosonfirst/go-whosonfirst-api/client/http.go:152 +0x81
main.main()
        /usr/local/mapzen/go-whosonfirst-api/cmd/wof-api.go:274 +0x1095

Specifically:

                if IsMapzenError(status_code) {

                        rsp, err := mapzen.ParseMapzenResponse(http_rsp)

                        if err != nil {
                                msg := fmt.Sprintf("%d %s", rsp.Meta.StatusCode, rsp.Results.Error.Message)
                                return nil, errors.New(msg)

                        }
                }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.