Message11699

Author daniele.trimarchi@coventor.com
Recipients daniele.trimarchi@coventor.com
Date 2018-01-24.10:44:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516790663.5.0.467229070634.issue2653@psf.upfronthosting.co.za>
In-reply-to
Content
This is a minor issue, but somehow annoying. 

Say there is a file that is busy because it is already opened in another application (for example: open a .csv file excel). 
When attempting to open this busy file in CPython2.7, we get a very specific error message: 

>python test.py
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    f = open('testIO.csv','w')
IOError: [Errno 13] Permission denied: 'testIO.csv'
>>>

Now attempt the same in Jython 2.7.0 and will get a misleading error: 
Jython 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_131
Type "help", "copyright", "credits" or "license" for more information.
>>> f = open('testFile.csv','w')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'testFile.csv'
>>>

Is there a chance to fix this behaviour and correcly report to the user what is going on?

Thanks, 
Daniele
History
Date User Action Args
2018-01-24 10:44:23daniele.trimarchi@coventor.comsetrecipients: + daniele.trimarchi@coventor.com
2018-01-24 10:44:23daniele.trimarchi@coventor.comsetmessageid: <1516790663.5.0.467229070634.issue2653@psf.upfronthosting.co.za>
2018-01-24 10:44:23daniele.trimarchi@coventor.comlinkissue2653 messages
2018-01-24 10:44:22daniele.trimarchi@coventor.comcreate