0

I'm trying to run code that worked last week, but when I try today, I get this error:

Traceback (most recent call last):
  File "/Users/voyager2/mu_code/IEDBWork/PMID32502341/32502341DSTMaker.py", line 6, in <module>
    import openpyxl, pprint, sys
  File "/Applications/mu-editor.app/Contents/Resources/app_packages/openpyxl/__init__.py", line 6, in <module>
    from openpyxl.workbook import Workbook
  File "/Applications/mu-editor.app/Contents/Resources/app_packages/openpyxl/workbook/__init__.py", line 4, in <module>
    from .workbook import Workbook
  File "/Applications/mu-editor.app/Contents/Resources/app_packages/openpyxl/workbook/workbook.py", line 7, in <module>
    from openpyxl.worksheet.worksheet import Worksheet
  File "/Applications/mu-editor.app/Contents/Resources/app_packages/openpyxl/worksheet/worksheet.py", line 24, in <module>
    from openpyxl.cell import Cell, MergedCell
  File "/Applications/mu-editor.app/Contents/Resources/app_packages/openpyxl/cell/__init__.py", line 3, in <module>
    from .cell import Cell, WriteOnlyCell, MergedCell
  File "/Applications/mu-editor.app/Contents/Resources/app_packages/openpyxl/cell/cell.py", line 1
    s stuff# Copyright (c) 2010-2019 openpyxl
          ^
SyntaxError: invalid syntax

It seems like there's a problem in the openpyxl. That code popped up when I was debugging, and I fear I may have accidentally typed something in it. But now I can't figure out how to open up the openpyxl code to check.

1
  • 1
    Check in the ../openpyxl/cell/cell.py to have at the top of the file (line 1) have this "# Copyright (c) 2010-2020 openpyxl" Something you type there... Commented Dec 28, 2020 at 19:04

1 Answer 1

1

Check that your file is not running in Microsoft Excel or any other excel editor. Or I think reinstall openpyxl may help you pip uninstall openpyxl and then pip install openpyxl

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.