Code Monkey home page Code Monkey logo

Comments (20)

rbaron avatar rbaron commented on June 4, 2024 3

Thanks @aaschmid. @ploth, let us know if it works! 😃

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024 1

Still working here, what command do you call @ploth?

from dict.cc.py.

rbaron avatar rbaron commented on June 4, 2024 1

Ah, I see. Looks like we're using urllib2 to make the HTTP request to dict.cc [0]. It doesn't seem to know about proxy environment variables [1].

I think we have two reasonable approaches:

  1. Update the code to use requests;
  2. Implement the proxy-switching logic based on the HTTPS_PROXY environment variable ourselves and use the stackoverflow solution.

I would lean towards approach 1, because it seems simpler and more standard. If you guys want to try and submit a PR, that would be great. Otherwise, I can do it a bit later today.

from dict.cc.py.

rbaron avatar rbaron commented on June 4, 2024

hi @ploth. Not sure if you solved it, but could it be that you're behind a proxy?

from dict.cc.py.

ploth avatar ploth commented on June 4, 2024

Yes I'm behind a proxy (company) but it stopped working 3 days ago. I don't know why it was working before.

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

Can you access https://www.dict.cc/ in your browser still? I assume so, so can you access it using curl or wget?

from dict.cc.py.

ploth avatar ploth commented on June 4, 2024

Can you access https://www.dict.cc/ in your browser still?

Yes

I assume so, so can you access it using curl or wget?

Yes

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

An using python and requests fails

echo -e "import requests\nprint(requests.get('https://dict.cc/'))" | python

???

from dict.cc.py.

rbaron avatar rbaron commented on June 4, 2024

@ploth another thing to try is to set the HTTPS_PROXY environment variable with the proxy your company uses. For example:

$ HTTPS_PROXY=http://my_proxy:my_port dict.cc.py en de body

from dict.cc.py.

ploth avatar ploth commented on June 4, 2024

An using python and requests fails
echo -e "import requests\nprint(requests.get('https://dict.cc/'))" | python
???

$ echo -e "import requests\nprint(requests.get('https://dict.cc/'))" | python
<Response [200]>

@ploth another thing to try is to set the HTTPS_PROXY environment variable with the proxy your company uses.

http_proxy and https_proxy environment variables are already set.

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

wasn't aware that we haven't used requests anyway but see #21 which does it not ;-)

from dict.cc.py.

ploth avatar ploth commented on June 4, 2024

It is working now. Thanks!
But it is strange that this doesn't work anymore 35aea3b

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

Don't get what you mean @ploth ?

from dict.cc.py.

ploth avatar ploth commented on June 4, 2024

Its missing those spaces for an unknown reason between the dots and the vocables.

body..............Körper

instead of

body .............. Körper

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

Ah ok, works for me using the latest master, installing via makepkg -i on Archlinux. How do you use it?

from dict.cc.py.

ploth avatar ploth commented on June 4, 2024

Installed from pip

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

thats the issue, pip does not have the latest version containing the wanted changes, see https://pypi.org/project/dict.cc.py/. The version in pip is from October 2016...

from dict.cc.py.

ploth avatar ploth commented on June 4, 2024

But we want to have a newer version on pip? I would maintain it.

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

@rbaron it is your repo, any thoughts?

from dict.cc.py.

rbaron avatar rbaron commented on June 4, 2024

Hi @aaschmid & @ploth,

I bumped the version to 3.0.0 and pushed it to PyPi: https://pypi.org/project/dict.cc.py/#history. Thanks for the inputs!

from dict.cc.py.

Related Issues (13)

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.