tldr-pages / tldr-python-client

Python command-line client for tldr pages
https://pypi.org/project/tldr/
MIT License
592 stars 92 forks source link

Error fetching from tldr: <urlopen error [Errno 104] Connection reset by peer> #210

Open h1zardian opened 1 year ago

h1zardian commented 1 year ago

In my case some options work while some don't. Screenshot from 2023-03-17 16-06-30

OS: Fedora Workstation 37

Tested both pip install tldr and dnf install tldr both results in the same behaviour.

CleanMachine1 commented 1 year ago

This is most likely an issue on your network from what I can tell.

Can you run this command curl https://raw.githubusercontent.com/tldr-pages/tldr/master/pages/common/ls.md and paste the output.

Also check if the website loads in your web browser.

0xSunsetJe3us commented 1 year ago

curl https://raw.githubusercontent.com/tldr-pages/tldr/master/pages/common/ls.md result: curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

CleanMachine1 commented 1 year ago

This is a problem with your network, not tldr

CleanMachine1 commented 1 year ago

I'm guessing from your Github location, you are located in China, which I believe has some bans on Github's services, you may want to change some code to find a github mirror which isn't banned.

lemonnuggets commented 9 months ago

For me curl works as expected but I get the error when I try using tldr for a page it doesn't have stored already.

Output from curl https://raw.githubusercontent.com/tldr-pages/tldr/master/pages/common/sed.md

# sed

> Edit text in a scriptable manner.
> See also: `awk`, `ed`.
> More information: <https://www.gnu.org/software/sed/manual/sed.html>.

- Replace all `apple` (basic regex) occurrences with `mango` (basic regex) in all input lines and print the result to `stdout`:

`{{command}} | sed 's/apple/mango/g'`

- Execute a specific script [f]ile and print the result to `stdout`:

`{{command}} | sed -f {{path/to/script.sed}}`

- Print just a first line to `stdout`:

`{{command}} | sed -n '1p'`

Output from tldr sed

Error fetching from tldr: <urlopen error [Errno 104] Connection reset by peer>

I've installed tldr via yay. Version tldr 3.2.0 (Client Specification 1.5)