Agent plugin wont load

I wrote a simple plugin that was meant only as a template, this was intended to scan audio.

class TestAgent(Agent.Album):
    name = 'Test Agent'
    languages = [
        Locale.Language.English,
    ]
    primary_provider = True
    fallback_agent = False
    accepts_from = None
    contributes_to = None
    
    def search(self, results, media, lang, manual):
        f = open('search', 'w')
        f.write('Self:' + '\n')
        f.write(str(self) + '\n\n\n')
        f.write('Results:' + '\n')
        f.write(str(results) + '\n\n\n')
        f.write('Media:' + '\n')
        f.write(str(media) + '\n\n\n')
        f.write('Lang:' + '\n')
        f.write(str(lang) + '\n\n\n')
        f.write('Manual:' + '\n')
        f.write(str(manual) + '\n\n\n')
        f.close()

    def update(self, metadata, media, lang, force):

I created the relevant files in the Plug-ins directory.

Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  
  <!-- Version should always be set to 2 -->		
  <key>PlexFrameworkVersion</key>
  <string>2</string>

  <key>CFBundleIdentifier</key>
  <string>com.plexapp.agents.testagent</string>

  <!-- This one does nothing with a value of Always On, but using a value of "daemon" keeps the plugin alive in the background -->	
  <key>PlexPluginMode</key>
  <string>Agent</string>

  <!-- List any client platforms supported in the plugin. -->	
  <!-- Possible values are * for all platforms, MacOSX, Windows, Linux, Roku, Android, iOS, Safari, Firefox, Chrome, LGTV, Samsung, PlexConnect and Plex Home Theater -->
  <key>PlexClientPlatforms</key>
  <string>*</string>
  
  <!-- List any client platforms not supported in the plugin. -->	
  <key>PlexClientPlatformExclusions</key>
  <string></string>
   
  <!-- possible string values are the proper ISO two letter code for the country -->
  <!-- A full list of values are available at http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 -->              
  <key>PlexPluginRegions</key>
  <array><string></string>
  </array>
	
	<!-- DEBUG OPTIONAL KEYS -->
  <!-- possible values are 0 and 1. Setting it to "1" rather than "0" turns on debug logging -->
  <key>PlexPluginDebug</key>
  <array><string>1</string>
	</array>       
  
  <!-- THESE BELOW ARE FOR AGENTS ONLY -->    
  
  <!-- this allows channels to access some python methods which are otherwise blocked, as well as import external code libraries, and interact with the PMS HTTP API -->	
  <key>PlexPluginCodePolicy</key>
  <string>Elevated</string>
  
  <!-- This key is used to show that the plugin is an agent. possible values are agent -->	
  <key>PlexPluginClass</key>
  <string>agent</string>

  <!-- This is used to send plugin log statements directly to stout when running PMS from the command line. Rarely used anymore-->
  <key>PlexPluginConsoleLogging</key>
	<string>0</string>
       
  <key>PlexAgentAttributionText</key>
  <string>Prints out data.</string>
</dict>
</plist>

DefaultPrefs.json:

[]

My directory structure:

├── TestAgent.bundle
│   └── Contents
│       ├── Code
│       │   └── __init__.py
│       ├── DefaultPrefs.json
│       └── Info.plist

When loading this agent however it never shows up under my agents list.

Does anyone know what I’m doing wrong?

EDIT:
After running for 5-10 minutes this error seems to show up in the log:

Timeout or error reading status line from plug-in pipe [com.plexapp.agents.testagent], we’re killing it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.