May-26-2023, 10:44 AM
I was working on a discord bot and wanted to scrape data from an excel spreadsheet so I installed the pandas library and imported it into my file. I wrote up a simple script and tried to run the file but nothing happened. I was confused so I tried to retrace my steps and eventually came to just editing out the import statement and my code ran again. I thought maybe just something wrong with the library so I moved to openpyxl and same thing. I then created a new file, imported openpyxl and ran a simple print statement. Nothing once more. So I commented out the import statement and then it worked. I don't get any errors when trying to run the code, it just simply does nothing. The terminal looks normal as if I had nothing to run in my file, when I clearly have a print statement.
That's what my code looks like when it doesn't work, and simply by commenting out the import statement and running again, the print statement executes. I really have no idea how to fix this problem or what might be going on.
1 2 3 |
import openpyxl print ( "Hello" ) |