racktables2netbox
racktables2netbox copied to clipboard
1054, "Unknown column 'description' in 'field list'
ITJamie, I am using your newer version. I am receiving this error.
" pymysql.err.OperationalError: (1054, "Unknown column 'description' in 'field list'")"
Racktables version: 0.20.14 Netbox Version: 3.3.0
Code changes since there is no 'description' field in racktables Tags table.
#def post_tag(self, tag, description): def post_tag(self, tag): url = self.base_url + "/extras/tags/" data = {} data["name"] = str(tag) data["slug"] = str(tag).lower().replace(" ", "_") #if not description is None: # data["description"] = description self.uploader2(data, url)
def get_tags(self): tags = []
if not self.con:
self.connect()
with self.con:
cur = self.con.cursor()
#q = 'SELECT tag,description FROM TagTree where is_assignable = "yes";'
q = 'SELECT tag FROM TagTree where is_assignable = "yes";'
cur.execute(q)
tags = cur.fetchall()
if config["Log"]["DEBUG"]:
msg = ("tags", str(tags))
logger.debug(msg)
cur.close()
self.con = None
for line in tags:
#tag, description = line
#netbox.post_tag(tag, description)
tag = line
netbox.post_tag(tag)