import MySQLdb
And I get this error from the sandbox.py
I'm using Ubuntu 12.04 and I can import MySQLdb and access MySQL tables from my own python code.
I'm getting test error listed in the log file
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py", line 595, in start
self.sandbox.execute(self.init_code)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 256, in execute
exec(code) in self.environment
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/MythAdult.bundle/Contents/Code/__init__.py", line 5, in
import MySQLdb
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 345, in __import__
raise e
ImportError: No module named MySQLdb
in looking at the sandbox.py script it has notes of:
class Sandbox(Framework.CoreObject):
"""
Sandbox manages the loading, compilation and execution of restricted code within a plug-in.
Multiple sandboxes can be created and used by the framework. Each sandbox is bound to a Framework
core object and a policy class. The policy dictates the API exposed to the sandboxed code and
which security measures should be used.
"""
def __init__(self, core, code_path, policy, flags=[], identifier = None):
Framework.CoreObject.__init__(self, core)
is using the import for MySQLdb not allowed and is there some override so I can access a MySQL table from a custom agent?
Thanks
Andre