Coder Social home page Coder Social logo

vocabipy's Introduction

๐Ÿ“– VocabiPy

Simple Dictionary made with CustomTkinter

Dark Mode

Dark mode VocabiPy

Light Mode

with translation

Light mode VocabiPy

This Project has been made possible with the help of Dictionary API made by meetDeveloper

vocabipy's People

Contributors

arielmaj avatar thefallen-cat avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

arielmaj

vocabipy's Issues

I'm having trouble getting the translation working

If I remove the translation part, as per shown below, I'm able to get the same output as in the example photo (for english results).
image

But if I try to run the project as it is, "translator.translate(text=text, dest=language)" raises an exception. By removing the try except, what I get is:

Exception in Tkinter callback                                                                                                                                                                               
Traceback (most recent call last):                                                                                                                                                                          
  File "...\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__                                                                                             
    return self.func(*args)                                                                                                                                                                                 
  File "...\VocabiPy\venv\lib\site-packages\customtkinter\widgets\ctk_button.py", line 372, in clicked                                                                     
    self.command()                                                                                                                                                                                          
  File "...\VocabiPy\main.py", line 103, in SearchMeaning                                                                                                                  
    final_meaning = dt.translate(meanings, language_selected)                                                                                                                                               
  File "...\VocabiPy\dictionarymethods.py", line 38, in translate                                                                                                          
    translated_text = translator.translate(text=text, dest=language)                                                                                                                                        
  File "...\VocabiPy\venv\lib\site-packages\googletrans\client.py", line 182, in translate                                                                                 
    data = self._translate(text, dest, src, kwargs)                                                                                                                                                         
  File "...\VocabiPy\venv\lib\site-packages\googletrans\client.py", line 78, in _translate                                                                                 
    token = self.token_acquirer.do(text)                                                                                                                                                                    
  File "...\VocabiPy\venv\lib\site-packages\googletrans\gtoken.py", line 194, in do                                                                                        
    self._update()                                                                                                                                                                                          
  File "...\VocabiPy\venv\lib\site-packages\googletrans\gtoken.py", line 62, in _update                                                                                    
    code = self.RE_TKK.search(r.text).group(1).replace('var ', '')                                                                                                                                          
AttributeError: 'NoneType' object has no attribute 'group'                                                                                                                                                  

I've made a PR adding a requirements.txt file, maybe you could update it adding the version of googletrans you're using. If it is different, maybe that could be what's causing this problem (considering this project is working properly in your computer).

I'm using Python 3.10.0 on Windows 11, I also had the very same problem when using Python 3.10.4 on WSL Ubuntu-22.04.

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.