"IOError: [Errno 71] Protocol error" when reading a file using python in a debian virtual machine

I am trying to open and read a file in Python 2.7.3 that is running in a virtual machine:

Host: Ubuntu 14.04 LTS

Guest: Debian Wheezy 7.5

VM-Software: VirtualBox V4.3.30

In the Python console inside the virtual machine, enter the following:

>>> f = open("Testing/results.txt", "w+") >>> f.read() Traceback (most recent call last): File "<stdin>", line 1, in <module> IOError: [Errno 71] Protocol error 

The file exists and is in the shared folder. If I try to do the same in a file that resides on the VM file system, it works fine. Also, opening a file with r + or a + mode, it works, but it does not get truncated. Truncating a file manually after opening in read mode works, and currently I'm using this as a workaround. But maybe someone knows why this error occurs?

+6
source share

All Articles