2014-08-29 23:44:06,025 (7fa45e439700) : INFO (core:347) - Starting framework core - Version: 2.5.0, Build: a51033b (Mon Jul 28 12:19:14 UTC 2014)
2014-08-29 23:44:06,025 (7fa45e439700) : DEBUG (core:359) - Using the elevated policy
2014-08-29 23:44:06,025 (7fa45e439700) : DEBUG (core:448) - Starting runtime component.
2014-08-29 23:44:06,026 (7fa45e439700) : DEBUG (core:448) - Starting caching component.
2014-08-29 23:44:06,026 (7fa45e439700) : DEBUG (core:448) - Starting data component.
2014-08-29 23:44:06,027 (7fa45e439700) : DEBUG (core:448) - Starting networking component.
2014-08-29 23:44:06,027 (7fa45e439700) : DEBUG (networking:288) - Loaded HTTP cookies
2014-08-29 23:44:06,027 (7fa45e439700) : DEBUG (networking:458) - Setting the default network timeout to 20.0
2014-08-29 23:44:06,028 (7fa45e439700) : DEBUG (core:448) - Starting localization component.
2014-08-29 23:44:06,028 (7fa45e439700) : INFO (localization:408) - Setting the default locale to en-us
2014-08-29 23:44:06,028 (7fa45e439700) : DEBUG (localization:426) - Loaded en strings
2014-08-29 23:44:06,028 (7fa45e439700) : DEBUG (core:448) - Starting messaging component.
2014-08-29 23:44:06,029 (7fa45e439700) : DEBUG (core:448) - Starting debugging component.
2014-08-29 23:44:06,029 (7fa45e439700) : DEBUG (core:448) - Starting services component.
2014-08-29 23:44:06,029 (7fa452ee1700) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/com.plexapp.agents.hdbits'
2014-08-29 23:44:06,029 (7fa45e439700) : DEBUG (core:448) - Starting myplex component.
2014-08-29 23:44:06,030 (7fa45e439700) : DEBUG (core:448) - Starting notifications component.
2014-08-29 23:44:06,158 (7fa45e439700) : DEBUG (accessor:68) - Creating a new model access point for provider com.plexapp.agents.hdbits in namespace 'metadata'
2014-08-29 23:44:06,161 (7fa45e439700) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2014-08-29 23:44:06,195 (7fa452ee1700) : DEBUG (services:265) - Plug-in is not daemonized - loading services from system
2014-08-29 23:44:06,195 (7fa45e439700) : DEBUG (runtime:1111) - Created a thread named 'load_all_services'
2014-08-29 23:44:06,197 (7fa452ee1700) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcnZpY2U6QWxsU2VydmljZXM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_'
2014-08-29 23:44:06,197 (7fa45e439700) : DEBUG (runtime:1111) - Created a thread named 'get_server_info'
2014-08-29 23:44:06,198 (7fa451edf700) : DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400'
2014-08-29 23:44:06,198 (7fa45e439700) : DEBUG (core:150) - Finished starting framework core
2014-08-29 23:44:06,199 (7fa45e439700) : DEBUG (core:558) - Loading plug-in code
2014-08-29 23:44:06,332 (7fa45e439700) : DEBUG (core:564) - Finished loading plug-in code
2014-08-29 23:44:06,441 (7fa45e439700) : CRITICAL (core:613) - Exception starting plug-in (most recent call last):
File "/home/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/core.py", line 606, in start
self.sandbox.execute(self.init_code)
File "/home/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/HdbitsSubtitles.bundle/Contents/Code/__init__.py", line 12, in
import rarfile
File "/home/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 333, in __import__
return mod.load_module(_name)
File "/home/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 44, in load_module
module = RestrictedModule(name, path, sandbox)
File "/home/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/loader.py", line 20, in __init__
code = sandbox._core.loader.load(filename, sandbox.policy.elevated_execution)
File "/home/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/loader.py", line 47, in load
code = self.compile(str(source), str(uni(filename)), elevated)
File "/home/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/loader.py", line 52, in compile
return RestrictedPython.compile_restricted(source, name, 'exec', elevated=elevated)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/RestrictedPython/RCompile.py", line 115, in compile_restricted
gen.compile()
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/RestrictedPython/RCompile.py", line 68, in compile
tree = self._get_tree()
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/RestrictedPython/RCompile.py", line 62, in _get_tree
raise SyntaxError, self.rm.errors[0]
SyntaxError: Line 703: Augmented assignment of attributes is not allowed.
2014-08-29 23:44:06,443 (7fa451edf700) : DEBUG (core:536) - Machine identifier is 4ee8d72248097270436889eafea8b9dd66056fcc
2014-08-29 23:44:06,444 (7fa451edf700) : DEBUG (core:537) - Server version is 0.9.9.13.525-197d5ed
2014-08-29 23:44:06,505 (7fa452ee1700) : DEBUG (services:362) - Loaded services
2014-08-29 23:44:06,507 (7fa4526e0700) : DEBUG (services:438) - No shared code to load
I've spent a good hour trying to rewrite rarfile.py to allow it to pass through RPython but still running into errors. I can understand the need for RPython parsing, but this makes including rarfile pretty difficult.
Is there a better way? If not, would you reconsider including it in main like zipfile so that it does not have to be included? Because rarfile is likely going to be doing some low level file operations that I don't even know would work under RPython after making all the changes - I have no idea what other restrictions will apply once I get through the parsing errors.