Giter Site home page Giter Site logo

Comments (13)

schachmat avatar schachmat commented on July 27, 2024

Heyho Artem,

unfortunately I cannot reproduce this. What is the golang version you're using? Which commit of wego are you using? On master line 441 would be res, err := http.Get(uri + strings.Join(params, "&")).

--schachmat

from wego.

ArtemZ avatar ArtemZ commented on July 27, 2024

I'm using go version xgcc (Ubuntu 4.9.1-0ubuntu1) 4.9.1 linux/amd64, commit is 4004fd5

from wego.

schachmat avatar schachmat commented on July 27, 2024

I cannot find a package named xgcc in the ubuntu repositories. The relevant package name would be golang-go

from wego.

mikegioia avatar mikegioia commented on July 27, 2024

I got this same error on Ubuntu 14.04. All I see is "core dumped", however. I'm not familiar with generating go stack traces, but I'd be willing to debug this for you if you have something I can run/test.

from wego.

schachmat avatar schachmat commented on July 27, 2024

As the mentioned line of failure mainly contains the http.Get function, please make sure you are not using an old version of golang. I am using v1.4.2 and cannot reproduce this issue. As far as I can see, Ubuntu 14.04 still uses v1.2.1. Make sure this version is up to date with sudo apt-get update && sudo apt-get upgrade. Any further hints on this issue are welcome.

from wego.

mikegioia avatar mikegioia commented on July 27, 2024

I just re-installed v1.2.1 and now I just see: 2015/05/14 12:55:54 Malformed response.

Is there an easy way I can debug this, or is it just a requirement to have 1.4.2 of go? If so, oy vey. This is the LTS Ubuntu :(

from wego.

schachmat avatar schachmat commented on July 27, 2024

See the setup section in the README. Until you have an API key setup, this error message is to be expected.

@ArtemZ does reinstalling golang-go also solve the problem for you?

from wego.

mikegioia avatar mikegioia commented on July 27, 2024

Very odd, I removed the package gccgo-go and installed the package golang which produced the "Malformed response" output.

I grabbed an API key, set it in the ~/.wegorc, and then ran "wego" again from the CLI and I get the weather visual. I run a second time, and I get the core dump!

screenshot from 2015-05-14 13 12 07

It appears as if it only runs correctly once every few minutes.

from wego.

schachmat avatar schachmat commented on July 27, 2024

Do you have a special network connection (vpn, tor, some corporate firewall, …)? Does it fail consistently or randomly? Can someone with Ubuntu 14.04 confirm, that it is working consistently?

from wego.

mikegioia avatar mikegioia commented on July 27, 2024

Completely randomly. I just ran it 3 times in 3 seconds, then the 4th time it failed. No special network config either.

from wego.

schachmat avatar schachmat commented on July 27, 2024

Can you uncomment the two debug output lines in main() and paste the output if any of a failed run?

from wego.

mikegioia avatar mikegioia commented on July 27, 2024

Okay I think I know what's going on. When I compile this app with gccgo-go (4.9.1) I get the segfaults. When I compile it with the package golang (1.2.1) the app runs perfectly. I'm assuming this has something to do with gccgo-go. Which is sad because that's the suggested package that Ubuntu gives you when you type "go get ..." and you don't have the go compiler installed.

Either way, this runs fine on golang1.2.1 on Ubuntu 14.04 with no issues. I could run the segfault tests using gccgo-go for you if you want, but I'd have to do that tonight.

I think this is the same as ArtemZ since he was using 4.9.1 (of package gccgo-go).

from wego.

schachmat avatar schachmat commented on July 27, 2024

Thanks @mikegioia for helping resolve this issue. You don't have to run the segfault tests. They will probably also indicate a failure in the http.Get line.

from wego.

Related Issues (20)

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.