Sep-08-2018, 03:50 AM
(This post was last modified: Sep-08-2018, 03:50 AM by Pedroski55.)
I have a simple program to put passport size photos next to the correct name in an excel table.
In the python shell, everything works and it does just what I want.
I use Ubuntu 16.04. When I start a terminal and run the program, I get the following error: (the ^ does not display properly on this web page, in a terminal it is directly under the :)
This seems to tell me the colon is wrong, but I'm certain it is needed in Python.
Line 75 is the first line below, the code is:
In the python shell, everything works and it does just what I want.
I use Ubuntu 16.04. When I start a terminal and run the program, I get the following error: (the ^ does not display properly on this web page, in a terminal it is directly under the :)
Quote:pedro@pedro-dodgySSD:~/myPython$ ./putPicsinColumn1version4.py
File "./putPicsinColumn1version4.py", line 75
for sheet in sheets:
^
SyntaxError: invalid syntax
pedro@pedro-dodgySSD:~/myPython$
This seems to tell me the colon is wrong, but I'm certain it is needed in Python.
Line 75 is the first line below, the code is:
for sheet in sheets: wb.active = wb[sheet] print('Active Sheet is ' + str(wb.active)) print('Max row is ' + str(wb.active.max_row)) for rowNum in range(beginRow, wb.active.max_row + 1): print('resizing row height in ' + str(wb.active)) wb.active.row_dimensions[rowNum].height = 72 # about 1"As I said, this works when I test it in the idle shell, just not when I want to run it in terminal. Anyone know why? Anyone had this kind of problem?