Group Group Group Group Group Group Group Group Group

dBase for my website always gives me this error “Invalid syntax”


Hi all, I am trained on selenium with blue prism. I have a web page I have developed and now am stuck getting told that the syntax is wrong. I cannot find the error, can someone please help me find my error? Here is my code for the database that is giving me my error:

from selenium import webdriver

from selenium.common.exceptions import TimeoutException
from import WebDriverWait
from import expected_conditions as EC
from import Options
from import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from import Select
from import Select
from bs4 import BeautifulSoup
from models import *

import os # File I/O
import time
import shutil
import glob
import configparser
config_parser = configparser.ConfigParser()“config.ini”)

pdownload_dir = os.path.abspath(’./prism_downloads/’)
dt = str(
filelist = glob.glob(download_dir + ‘/*.html’)
dbpath = (’./db’)
def db_Prism():

    database.create_tables([Prism], safe=False)

    for root, dir, files in os.walk(pdownload_dir):
        for file in files:
            file_markup = ''
            with open(os.path.abspath(os.path.join(pdownload_dir, file)), 'r') as html:
                file_markup =
            if file_markup == '':
                print('ERROR: File was not read')
            print('Reading {0} into BS4'.format(file))
            soup = BeautifulSoup(file_markup, 'html.parser')
            print('File parsed')
            data = []
            table = soup.find('table')
            rows = table.find_all('tr') # 18th row is header row 
            cols = rows[0].find_all('td')
            cols = [ele.text.strip() for ele in cols] 
            for row in rows[0:]:
                d = row.find_all('td')
                d = [ele.text.strip() for ele in d]
                data.append([ele for ele in d if ele]) # Get rid of empty values 

Line 96 database.close()

Now here is the error message from my console:

File “”, line 96
SyntaxError: invalid syntax



opened #3