Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'asyncio' has no attribute 'run' #13

Closed
andradadad opened this issue Nov 6, 2019 · 4 comments
Closed

'asyncio' has no attribute 'run' #13

andradadad opened this issue Nov 6, 2019 · 4 comments

Comments

@andradadad
Copy link

Query error: The program has returned exit code 1. Traceback (most recent call last): File "C:\googletranslate.py", line 132, in <module> asyncio.run(get_translation()) AttributeError: module 'asyncio' has no attribute 'run'

Also, can you tell me how to separate the original line to the translate with a double space? I tried looking into the script and couldn't find it, I think it's much more comprehensible to have them separated with a blank line inbetween than just a /r/n.

@xinebf
Copy link
Owner

xinebf commented Nov 6, 2019

Update Python 3 to Python 3.7+

@xinebf
Copy link
Owner

xinebf commented Nov 7, 2019

Change Line 100 to:

result = get_result(result, resp_alt) + '\n \n'

Change Line 104 to:

result += '^_^: Translate {} To {}\n{}\n \n'.format(resp[2], target_language, query_string)

@andradadad
Copy link
Author

And how do I remove the entire line ^_^: Translate {} To {}

I want the Original+/n/n+translated

@xinebf
Copy link
Owner

xinebf commented Nov 10, 2019

Use this commit and replace Line 26 with

result = result + '{}\n \n'.format(sys.argv[2])

@xinebf xinebf closed this as completed Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants