ningsongshen / pe

0 stars 0 forks source link

Error when data file is open in another program #8

Open ningsongshen opened 6 months ago

ningsongshen commented 6 months ago

image.png

I had my CSV file open in microsoft excel when running this series of commands.

Maybe prevent editing when the data file is locked can prevent this error.

soc-pe-bot commented 6 months ago

[IMPORTANT!: Please do not edit or reply to this comment using the GitHub UI. You can respond to it using CATcher during the next phase of the PE]

Team's Response

Hi there, thank you for your report.

I have tried to replicate the bug as per your description, and indeed I faced the same issue that you encountered. This is mainly due to Excel locking the file while it is being opened within Excel, and our StockPal app also reading and writing from the same file at the same time. I also appreciate the fact that you suggested that we should prevent editing when the data file is locked to prevent the error. However, after some googling and research, it showed that this might not be possible as CSV on its own is a text file, and thus the prevention of editing the file might only be possible if done at the system/OS level. I have also attached some screenshots of the results of my search below, and please do correct me if I'm wrong.

The links to these pages are respectively: 1) Reddit post on making a CSV uneditable 2) Chat history with Gemini

image.png

image.png

In addition, I have also found a solution to this, which is to close the Excel file before running exit in the StockPal app. In this way, the data that you entered within that StockPal session will still be saved properly into the CSV file, even though it might most likely overwrite the changes you did in Excel. We do still appreciate such reports, as it shows that there would definitely be ways that our app can be improved. If you have any specific way that we can prevent editing while the data file is being opened in Excel, please do advise us. Thank you very much for the report!

Best Regards, StockPal Team

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: [replace this with your reason]