Python Forum

Full Version: Use of the openpyxl library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I work in a Windows environment and use the openpyxl library to read and manipulate Excel files.
When installing the application on a new server, I notice that this library completely blocks the app's startup: at launch, after a few moments, I am presented with the DOS shell prompt again without any error message.
To isolate the problem, I wrote the following code that shows the same behavior: when encountering the "import openpyxl" instruction, the app stops and returns to the system prompt. I would like to receive suggestions. Thank you.
Would you like me to offer some advice on troubleshooting this issue with openpyxl?

import logging
logging.basicConfig(level=logging.DEBUG)
print("Before import")
try:
    import openpyxl
    logging.debug("Ok")
except Exception as e:
    logging.error(f"Error during openpyxl import: {e}")