terryyin / terryyin/translate-python
Error when running "from translate import Translator"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 759
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the traceback and the import at utils.py line 17, then reproduce from translate import Translator in the reported Python 2.7 Plex environment. Compare the failing import path with the package's supported environment; done means the import no longer raises ImportError: cannot import name request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100