Im trying to access excel files using python ,
The code works on visual studio but when i run it in visual studio code i get the following error message :
Looks like you made a mistake: Missing parentheses in call to ‘print’. Did you mean print(…)? (init.py, line 1187)
all my print statments include parenthesis and i cant locate this init.py,my code doesnt even have 1187 lines of code
I went through all the code but couldnt find where an error might be ,also tried looking for the init.py file,dont know where to find it
import pandas as pd
from searchNames import search_names
from openpyxl import load_workbook
from Excel import txt_to_excel
#C:UsersmotheOneDriveDesktopLFLSample.xlsx
print(‘Welcome’)
while True:
try:
#takes input for the file path that will be worked with
file_path = input(‘Please specify file path of Excel spreadsheet: ‘).strip()
xl = pd.ExcelFile(file_path)
break
except Exception as e:
print(‘nLooks like you made a mistake:’, e)
print(‘Please enter a valid file path.’)
while True:
user_input = 0
if user_input == 999:
break
print('nExcel sheet names:', xl.sheet_names)
print('nWhat tasks would you like to perform today?')