Error message: Traceback (most recent call last): File "read_google_sheet.py", line 20, in <module> wks = gc.open_by_key("1jUJOlICOH6VnyuALdU2VAc_Ci_ZVwdW-xc5kr_qkJHY") File "/usr/lib/python2.7/site-packages/gspread/client.py", line 113, in open_by_key raise SpreadsheetNotFound gspread.exceptions.SpreadsheetNotFound Solved : In the json file, there is a "client_email". You need to share your file with this email.
We got error message shown as below: [/home/omicsacademy/miniconda3] >>> PREFIX=/home/omicsacademy/miniconda3 Unpacking payload ... concurrent.futures.process._RemoteTraceback: ''' Traceback (most recent call last): File "concurrent/futures/process.py", line 368, in _queue_management_worker File "multiprocessing/connection.py", line 251, in recv TypeError: __init__() missing 1 required positional argument: 'msg' ''' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "entry_point.py", line 69, in <module> File "concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists File "concurrent/futures/_base.py", line 611, in result_iterator File "concurrent/futures/_base.py", line 439, in result File "concurrent/futures/_base.py", line 388, in __get_result concurrent.futures.process.BrokenProc...
Here is a snippet to update the TOC of a word 2013 .docx document which includes only one table of content (e.g. just TOC of headings, no TOC of figures etc.). If the script update_toc.py is run from the command promt (windows 10, command promt not "running as admin") using python update_toc.py the system installation of python opens the file doc_with_toc.docx in the same directory, updates the TOC (in my case the headings) and saves the changes into the same file. The document may not be opened in another instance of Word 2013 and may not be write-protected. Be aware of that this script does not the same as selecting the whole document content and pressing the F9 key . Content of update_toc.py : import win32com . client import inspect , os def update_toc ( docx_file ): word = win32com . client . DispatchEx ( "Word.Application" ) doc = word . Documents . Open ( docx_file ) doc . TablesOfContents ( 1 ). Update () ...
Comments
Post a Comment