<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AttributeError: 'My_Plugin_Class' object has no attribute 'topology_builder' in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175351#M1758</link>
    <description>&lt;P&gt;Hi Ben, you can also increase the version in the plugin.json. That will automatically restart the remote plugin module.&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
    <pubDate>Wed, 03 Nov 2021 15:48:17 GMT</pubDate>
    <dc:creator>Mike_L</dc:creator>
    <dc:date>2021-11-03T15:48:17Z</dc:date>
    <item>
      <title>AttributeError: 'My_Plugin_Class' object has no attribute 'topology_builder'</title>
      <link>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175287#M1755</link>
      <description>&lt;P&gt;Hi, im trying to build my first ActiveGate extension,&amp;nbsp; the aim is to use the plugin to take information from some files prepared from other sources, then pump the metrics into Dynatrace.&lt;BR /&gt;&lt;BR /&gt;However every time i run it, i get the above error.&lt;BR /&gt;Sample from my script below.&lt;/P&gt;
&lt;P&gt;I've pretty much copied the demo_activegate_plugin_multi from the examples.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Any thoughts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import re
import json
import os
import ruxit.api.topology_builder
from ruxit.api.exceptions import ConfigException
from ruxit.api.base_plugin import RemoteBasePlugin
from ruxit.api.data import PluginProperty


class Primary_RTU_Monitoring(RemoteBasePlugin):

    
    def query(self, **kwargs):
        if self.config["debug"]: #debug mode run every min.

            path = r"E:\Scripts\RTU_IO_MON\LOGS\\"
            categories = os.listdir(path)

            for item in categories:
                topology_group = self.topology_builder.create_group(identifier=item, group_name="RTU_IO_MONITORING")
                try:
                    file_name = "\results.json"
    ...........etc&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 11:34:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175287#M1755</guid>
      <dc:creator>Ben_Harvey</dc:creator>
      <dc:date>2023-05-18T11:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'My_Plugin_Class' object has no attribute 'topology_builder'</title>
      <link>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175329#M1756</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from ruxit.api.topology_builder import TopologyBuilder
from ruxit.api.exceptions import ConfigException
from ruxit.api.base_plugin import RemoteBasePlugin


class My_Plugin_Class(RemoteBasePlugin, TopologyBuilder):&lt;/LI-CODE&gt;&lt;P&gt;Looks like its an issue with my imports. It now works in the simulator with the arrangement shown. I thought RemoteBasePlugin imported BasePlugin, which in turn imported TopologyBuilder. Guess not.&lt;BR /&gt;&lt;BR /&gt;demo_activegate_plugin_multi.py only imports RemoteBasePlugin.&lt;BR /&gt;&lt;BR /&gt;Hopefully its a fix, time to test deployment.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 12:15:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175329#M1756</guid>
      <dc:creator>Ben_Harvey</dc:creator>
      <dc:date>2021-11-03T12:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'My_Plugin_Class' object has no attribute 'topology_builder'</title>
      <link>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175348#M1757</link>
      <description>&lt;P&gt;Fix worked. For the sake of anyone else who stumbles here in future:&lt;BR /&gt;&lt;BR /&gt;When you update the plugin file, you need to stop and start the activegate service, or else your changes will not be loaded. This caught me out for a while. make sure you allow a few min in the stopped state before starting again.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 15:38:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175348#M1757</guid>
      <dc:creator>Ben_Harvey</dc:creator>
      <dc:date>2021-11-03T15:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'My_Plugin_Class' object has no attribute 'topology_builder'</title>
      <link>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175351#M1758</link>
      <description>&lt;P&gt;Hi Ben, you can also increase the version in the plugin.json. That will automatically restart the remote plugin module.&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 15:48:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175351#M1758</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2021-11-03T15:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: AttributeError: 'My_Plugin_Class' object has no attribute 'topology_builder'</title>
      <link>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175353#M1759</link>
      <description>&lt;P&gt;Thanks for that Mike, good to know!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 15:52:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/AttributeError-My-Plugin-Class-object-has-no-attribute-topology/m-p/175353#M1759</guid>
      <dc:creator>Ben_Harvey</dc:creator>
      <dc:date>2021-11-03T15:52:00Z</dc:date>
    </item>
  </channel>
</rss>

