terryyin / translate-python

Online translation as a Python module & command line tool. No key, no authentication needed.
MIT License
732 stars 153 forks source link

Error when running "from translate import Translator" #81

Open JPH71 opened 3 years ago

JPH71 commented 3 years ago

I am writing a plex agent which uses python 2.7 and I get the following error:

` File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-186bae04e\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\core.py", line 608, in start self.sandbox.execute(self.init_code)

File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-186bae04e\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 256, in execute exec(code) in self.environment

File "C:\Users\jphud\AppData\Local\Plex Media Server\Plug-ins\GEVI.bundle\Contents\Code__init__.py", line 107, in import utils

File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-186bae04e\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 333, in import return mod.load_module(_name)

File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-186bae04e\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 44, in load_module module = RestrictedModule(name, path, sandbox)

File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-186bae04e\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\loader.py", line 30, in init exec(code) in self.dict

File "C:\Users\jphud\AppData\Local\Plex Media Server\Plug-ins\GEVI.bundle\Contents\Code\utils.py", line 17, in from translate import Translator

File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-186bae04e\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 345, in import raise e

ImportError: cannot import name request `

Please help! It is failing on this line from translate import Translator