hey there<br><br>i have written a module called site.py<br>in the file i have this:<br><br>import DbConnector<br>import sensor<br><br>class Site(object):<br> "site object"<br> <br> def __init__(self, id):
<br> <a href="http://self.id">self.id</a> = id<br> self.con = DbConnector.DbConnector() <br> id = str(<a href="http://self.id">self.id</a>)<br> stats = self.con.getOne("selct `group_id`, `name`, `ivr_code`, \
<br> `site_type`, `notes`, `sensor_id` \<br> from `sites` where `id` = '"+str(id)+"' ")<br> self.group_id = stats[0]<br> <a href="http://self.name">self.name</a> = stats[1]
<br> self.ivr_code = stats[2]<br> self.site_type = stats[3]<br> self.notes = stats[4]<br> self.sensor_id = stats[5]<br> <br> def get_sensor(self):<br> self.sensor = sensor.Sensor
(self.sensor_id)<br> return self.sensor<br><br>ok, in the program i am trying to run i have these lines:<br>import site<br>new_site = site.Site(id_number)<br><br>and this is what my output is:<br>Traceback (most recent call last):
<br> File "./new_camp.py", line 2014, in on_site_tree_view_row_activated<br> acitve_site = site.Site(id_number)<br>AttributeError: 'module' object has no attribute 'Site'<br><br>It looks like the same code works for a different module i have ;
<br>i don't get what i could be missing here, any tips?<br><br>if you have read this far, thanks for your time.<br>sk<br><br><br><br>