I am using python 3.6 with Visual Studio Code on window 10. I was working on extracting data from SmartSheet using API. Here is my code.
import smartsheet
import importlib
import supporting_tools as spt
Token = 'api_token'
sheet_id_2nd = 'sheet_id'
sheet_id_3rd = 'sheet_id'
sheet2nd = spt.read_sheet (Token, sheet_id_2nd)
sheet3rd = spt.read_sheet (Token, sheet_id_3rd)
col_map_2nd = spt.col_list (sheet2nd)
col_map_3rd = spt.col_list (sheet3rd)
print(col_map_2nd)
id_set_2nd = set()
id_set_3rd = set()
for row in sheet2nd.rows:
Id_cell = spt.get_cell_by_column_name(row, "Row ID", col_map_2nd)
id_set_2nd.add(Id_cell.display_value)
print(id_set_2nd)
for row in sheet3rd.rows:
Id_cell = spt.get_cell_by_column_name(row, "Row ID", col_map_3rd)
id_set_3rd.add(Id_cell.display_value)
print(id_set_3rd)
This works fine when I run it in debug mode but returns this error when I run it in the terminal. I searched for a solution and it seems like there is problem with iPython but I am not sure. Any advice?
"C:/Users/Jay Choi/AppData/Local/Programs/Python/Python36/python.exe" "c:/Users/Jay Choi/Desktop/New folder/main.py"
File "<stdin>", line 1
"C:/Users/Jay Choi/AppData/Local/Programs/Python/Python36/python.exe" "C:/Users/Jay Choi/Desktop/New folder/main.py"
^
SyntaxError: invalid syntax