#whats your code

1 messages · Page 1 of 1 (latest)

glass crystal
#

Well it was going to be the machine language one so I can do it on my pc and see if ChatGPT can edit and return it without having to trigger itself lol

young patrol
glass crystal
#

ie. doing the edits without looking at them in english so to speak.. which I doubt would work but I was curious

#

hurm .

glass crystal
# young patrol no whats the code that doesnt reach google

Enter the text to translate: Hello Welcome to Machine Talk Enter the text to translate: generate Traceback (most recent call last): File "C:\Users\Tim\OneDrive\Documents\AI\PYTHON\ttr_simulation.py", line 20, in <module> translation = translator.translate(input_text, dest=output_language).text ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Tim\AppData\Local\Programs\Python\Python311\Lib\site-packages\googletrans\client.py", line 182, in translate data = self._translate(text, dest, src, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Tim\AppData\Local\Programs\Python\Python311\Lib\site-packages\googletrans\client.py", line 78, in _translate token = self.token_acquirer.do(text) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Tim\AppData\Local\Programs\Python\Python311\Lib\site-packages\googletrans\gtoken.py", line 194, in do self._update() File "C:\Users\Tim\AppData\Local\Programs\Python\Python311\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'

young patrol
glass crystal
# young patrol yes, but whats the code, not the error

`# Required Libraries
import googletrans
from googletrans import Translator

Default Settings

input_language = "en"
output_language = "x86-64"
key = "DEFAULT KEY"

Initialize Translator

translator = Translator()

User Input Loop

while True:
text = input("Enter the text to translate: ")

if text == "exit":
    break

if text == "generate":
    translation = translator.translate(text, dest=output_language).text
    print("Generated Translation: " + translation)

if "input language" in text:
    input_language = text.split(" ")[-1]
    print("Input Language Changed to: " + input_language)

if "output language" in text:
    output_language = text.split(" ")[-1]
    print("Output Language Changed to: " + output_language)

if "change key" in text:
    key = text.split(" ")[-1]
    print("Key Changed to: " + key)

if text.startswith("generate") and len(text.split(" ")) > 2:
    input_text = text.split(" ", 2)[-1]
    input_key = text.split(" ", 2)[1]
    if input_key == key:
        translation = translator.translate(input_text, dest=output_language).text
        print("Generated Translation: " + translation)
    else:
        print("Invalid Key!")       

`

young patrol
#

hmmm

glass crystal
#

I use a vpn, so I was thinking maybe it's just not allowed to connect from it..

strong pilot
#

It looks like the issue isn't network related, from reading the error

young patrol
#

this looks hard

strong pilot
#

Try this to test

young patrol
proven stratus
strong pilot
#
print(get('http://checkip.dyndns.org').text)```
strong pilot
#

I'm not, it's just a fast way to test network connectivity

glass crystal
young patrol
#
print("hello")```
strong pilot
glass crystal
young patrol
frosty nexus
young patrol
#

wait

frosty nexus
#

from his code lol

young patrol
glass crystal
young patrol
#

btw

young patrol
glass crystal
young patrol
#

that wont work

#

google translate only works on human languages

glass crystal
glass crystal
#

k that libaray is in

young patrol
glass crystal
#

I really am just trying to make a way to scramble and unscramble text, with an offset with a "key" to lock it, and unlock it.. that would maybe let ChatGPT look at some machine code, do edits and return as machine code again

#

and to run it in python so I can not have to always use chatgpt to do it

young patrol
glass crystal
#

as far as the transation and regeration goes ..

#

and if nothing works, then at least I would have a working python to do something with.. i guess

glass crystal
glass crystal
glass crystal