Code Monkey home page Code Monkey logo

Comments (5)

aaschmid avatar aaschmid commented on June 4, 2024

What about something like in this diff: master...aaschmid:master
This might be solving #15, it also solves #12 and suggest an improvment for copy&pasting words from CLI.

Any feedback welcome and I am happy to improve it. I will also create single PRs for every topic if some is already OK for you...

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

@rbaron: Any thoughts on my first steps in order to improve it and create a PR?

from dict.cc.py.

rbaron avatar rbaron commented on June 4, 2024

Hi @aaschmid,

it seems like your branch is not working correctly on my computer with Python3:

% dict.cc.py en de body
Traceback (most recent call last):
  File "/private/tmp/dict.cc.py/venv/bin/dict.cc.py", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/private/tmp/dict.cc.py/scripts/dict.cc.py", line 81, in <module>
    run()
  File "/private/tmp/dict.cc.py/scripts/dict.cc.py", line 62, in run
    args.output_language)
  File "/private/tmp/dict.cc.py/dictcc/dictcc.py", line 60, in translate
    result = cls._parse_response(response_body)
  File "/private/tmp/dict.cc.py/dictcc/dictcc.py", line 101, in _parse_response
    languages = [language.strings.next() for language in soup.find_all("td", class_="td2", attrs={'dir': "ltr"})]
  File "/private/tmp/dict.cc.py/dictcc/dictcc.py", line 101, in <listcomp>
    languages = [language.strings.next() for language in soup.find_all("td", class_="td2", attrs={'dir': "ltr"})]
AttributeError: 'generator' object has no attribute 'next'

from dict.cc.py.

aaschmid avatar aaschmid commented on June 4, 2024

better @rbaron?

  • I used python 2; now it is running with both 2 and 3)
  • Removed the other fix also from my master but did not rebase it yet

from dict.cc.py.

rbaron avatar rbaron commented on June 4, 2024

Hi @aaschmid, I just tested it and works great. Feel free to send a PR!

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.