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

ConnectionRefusedError: [Errno 61] Connection refused #2

Closed
Shreif-Shouman opened this issue Apr 15, 2022 · 4 comments
Closed

ConnectionRefusedError: [Errno 61] Connection refused #2

Shreif-Shouman opened this issue Apr 15, 2022 · 4 comments

Comments

@Shreif-Shouman
Copy link

Shreif-Shouman commented Apr 15, 2022

Hello,
I'm trying to run the following script:

from gpsdclient import GPSDClient

client = GPSDClient(host="127.0.0.1")
for result in client.json_stream():
print(result)

But it gives me always the error

714             if source_address:
715                 sock.bind(source_address)
716             sock.connect(sa)
717             # Break explicitly a reference cycle
718             err = None

ConnectionRefusedError: [Errno 61] Connection refused

I try to change the host to '0.0.0.0' but still not working and I do not know how to solve it ???!!!
Any hints for that!!

@tfeldmann
Copy link
Owner

Is gpsd running in the background?

@Shreif-Shouman
Copy link
Author

well, I think yes it's running in the background, because if I print (client) I get back:
<GPSDClient(host=127.0.0.1, port=2947)>

@tfeldmann
Copy link
Owner

tfeldmann commented Apr 15, 2022

Did you install gpsd on your system? What is the output of systemctl status gpsd (if you are on linux)?

This software is required for the client to work: https://gpsd.gitlab.io/gpsd/index.html

@tfeldmann
Copy link
Owner

Closing this as I suspect gpsd was not installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants