Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

1054, "Unknown column 'description' in 'field list' #6

Open
jbcreek opened this issue Aug 22, 2022 · 1 comment
Open

1054, "Unknown column 'description' in 'field list' #6

jbcreek opened this issue Aug 22, 2022 · 1 comment

Comments

@jbcreek
Copy link

jbcreek commented Aug 22, 2022

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

@jbcreek
Copy link
Author

jbcreek commented Aug 23, 2022

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant