Git Product home page Git Product logo

ebooktranslator's Issues

Error in browser.py

Hi, thanks for the project is extremely useful. It would be great if you could post a few lines about the usage commands. I figured out from the ebook_translator.py there is a way to eidt the last block in order to change the language and file parameters for what I need but ran into these problems:

Reading text into memory.
Tokenizing text into sentences.
Starting translation from the beginning.
Initializing DeepL translator
Traceback (most recent call last):
File "./scripts/ebook_translator.py", line 64, in
ebook_translator = EbookTranslator(path, "de", "en", engine="DeepL")
File "./scripts/ebook_translator.py", line 17, in init
self.translator = Translator(source_language, target_language, engine)
File "C:\Users\Netadmin\Documents\GitHub\EbookTranslator\scripts\translator.py", line 14, in init
self.set_engine(engine)
File "C:\Users\Netadmin\Documents\GitHub\EbookTranslator\scripts\translator.py", line 22, in set_engine
self.engine = DeepLEngine(self.source_language, self.target_language)
File "C:\Users\Netadmin\Documents\GitHub\EbookTranslator\scripts\translator.py", line 58, in init
self.browser = Browser(headless=True)
File "C:\Users\Netadmin\Documents\GitHub\EbookTranslator\scripts\browser.py", line 38, in init
self.start()
File "C:\Users\Netadmin\Documents\GitHub\EbookTranslator\scripts\browser.py", line 41, in start
chrome_binary = self.choose_browser_binary()[0]
TypeError: 'NoneType' object is not subscriptable

Do you know why?

Thanks,

Radu

Error when using Google special chars

Hi again, if using a German text with special characters as source language and Google as engine it comes to this error:

Reading text into memory.
Tokenizing text into sentences.
Starting translation from the beginning.
Initializing Google translator
0%|โ–‹ | 16/4290 [00:03<17:36, 4.05it/s]
Traceback (most recent call last):
File "./scripts/ebook_translator.py", line 65, in
ebook_translator.translate()
File "./scripts/ebook_translator.py", line 23, in translate
self.write_to_file(both_sentences, self.out_path)
File "./scripts/ebook_translator.py", line 42, in write_to_file
file.write(text)
File "C:\Radu\Miniconda3\envs\purr2\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 18-19: character maps to

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.