Questions tagged [ioerror]
Anything related to Input/Output errors, i.e. errors happening while a program is performing an I/O operation, such as opening a file, reading from a stream, writing to a socket, etc.
0
votes
2answers
77 views
Why do I get Python IOError: [Errno 13] Permission denied on writing to a file?
I cannot figure out what I am doing wrong. I am running some tests and writing the results to a file. The portion of the code which writes to a file is the following (in a class called Tester):
@...
0
votes
0answers
34 views
Can not show image with tkinter (IOError)
So I try to show an image in a window by using tkinter. Somehow I always get an IOError:
IOError: [Errno 2] No such file or directory: 'C:\\Users\\domin\\Desktop\\NEu\\Download.jpg'
or
IOError: [...
0
votes
0answers
28 views
How to solve - IOERROR : Fatal Error: File 'path/to/file' could not be located or is not readable
I have been trying to open a file by passing it as an argument.
I have been providing the correct file path and the file is also readable.
I created another script in order to determine whether the ...
1
vote
1answer
23 views
Reading multiple files “except IOError as exc:”
I was looking through some example of how to read multiple files of data and come across these codes pop-up a lot:
try:
...
except IOError as exc:
if exc.errno != errno.EISDIR:
raise
...
0
votes
0answers
29 views
IOError: [Errno 24] Too many open files - but I close all files
I am reading every 0.01s a file, but I does it with
with open('file.txt','r') as FILE:
data = FILE.read()
Which should be according to official documentation save way to open and close file.
...
0
votes
0answers
48 views
IOError: [Errno 13] Permission denied: 'Test.xlsx'
the goal of my program is to read the sheet SNR_COPY1 from the Test.xlsx file, using the data to do some computations and then write those to a new sheet within Test.xlsx... Now yesterday my code ...
0
votes
0answers
36 views
System.IO exception when calling Console Buffer Size
I've been playing around with creating a game engine within the windows command prompt, mostly for educational purposes and see how far i can push it. I've just stumbled upon an error which i can't ...
2
votes
2answers
58 views
Python proper way to catch exceptions on file close
I'm old at Perl and new to Python. I know in Perl that fd.close() isn't irrelevant. Writing to a full file system, close() will report the error. Also for socket errors, they appear in close(). So how ...
1
vote
0answers
85 views
IOError: [Errno 2] No such file or directory when training Keras model
I have been having some issues with training my sequential model in Keras. I am new to the subject, therefore there is a lot of following tutorials and code snippets involved...
I was building a ...
0
votes
2answers
121 views
Not Able to connect to Oracle Autonomous Datawarehouse Cloud using any of the way
I am trying to connect to the Oracle Autonoumous Datawarehouse using JDBC Thin connections and wallet using below ways:
1. SQLDeveloper
2. Sqlcl
I am following the steps mentioned in https://docs....
0
votes
0answers
297 views
IOError - \xe2\x80\x8e\xe2\x81\
I'm trying to read a csv file as follows:
with open('file.csv') as csv_file:
But, getting the following error:
IOError: [Errno 2] No such file or directory: '\xe2\x80\x8e\xe2\x81\xa8file.csv'
I ...
0
votes
1answer
254 views
Getting I/O error while executing JUnit test case for Spring Controller
I am executing a test case to call spring controller (GET method). However, It throws below I/O error.
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://...
0
votes
0answers
261 views
Python logger throwing IOError: [Errno 22] Invalid argument
I'm getting an error from trying to write to a file and log normal text. Here's my logger output:
Bad measurement: 40.74478609626E-9,81.48235294118E-9,163.01491596639E-9,244.51470588235E-9,326....
0
votes
0answers
39 views
Getting error with KDTree in Anaconda2 and 3?
I'm using Anaconda2 with kdtree with x, y and z components. When I try this it says IOError: Not Enough space; if I switch to Anaconda 3 and add in list() then I get a maximum recursion depth error. ...
0
votes
0answers
141 views
IOError: [Errno 22] invalid mode ('rb') or filename invoking shutil.copy()
I'm working on a program in Python that copies all the mp3 files in a folder to another destination, but I'm facing a problem.
This is the code:
import os
import shutil
def copy_music():
...
2
votes
2answers
75 views
Python retry to open the file
What is the best practice to try to open the file and retry after n seconds?
Currently, I do:
import os
from os import path
import shutil
dir_path = path.abspath(path.join("foo", "bar"))
...
0
votes
2answers
67 views
I Uninstalled python 2.7 by mistake and I can't reinstall it in kali linux( latest release)
I uninstalled python 2.7 from kali linux by mistake and whenever i run python i get the following error. Is there a way to solve this
Traceback (most recent call last):
File "/usr/lib/python2....
0
votes
1answer
276 views
shutil.copyfile keep returning error of permission denied
I am trying to copy contents of a folder but it keeps on showing the error of Permission denied.
import subprocess
import shutil
import os
procId = subprocess.call('adb pull /sdcard/HDrec2.0/...
0
votes
0answers
85 views
Error when opening file: IOError: [Errno 0] Error
I am trying to open a file in my python code, but I get the error 'IOError: [Errno 0] Error'. You can see my code below:
fd = open('./Aeolis_data/AeolisTimeStamp.pck1', 'wt')
prevTimeStamp = pickle....
0
votes
0answers
35 views
Python 3 IOError on renaming files
I'm writing a script that parses some directories to rename files with special characters. My code looks like this:
for root, subFolders, files in os.walk(mountpunt):
for fl in files:
#pdb....
0
votes
1answer
45 views
JDBC connections failing only in Tomcat
This is weird: any JDBC connection from any webapp deployed in Tomcat fails with
IO Error: The Network Adapter could not establish the connection
while they work perfectly fine from the command ...
2
votes
1answer
47 views
Python - Printing values from a c++ DLL error
I have a short snippet of python code which calls a C++ DLL. The DLL function takes in a pointer to a table of 6 doubles (for output), and a table of strings for input.
myDll.get_results.argtypes = [ ...
2
votes
1answer
1k views
python print with IOError: [Errno 0] Error
ll=[]
for ii in range(26):
ll.append(chr(97+ii))
for ii in range(10000):
print ll
When I print like this, it will report some error, Why?!
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', ...
0
votes
0answers
31 views
IO Error python PIL image preprocessing script
I am following this tutorial and specifically going through the "generate own data" section:
https://github.com/surfertas/deep_learning/tree/master/projects/imdbwiki-challenge
https://github.com/...
0
votes
0answers
109 views
Python windows 7 permission denied on main directory of USB drive
I am currently trying to copy a file using shutils.copyfile(), I am running into the problem on a windows 7 machine I have where it gives me the error:
Exception in Tkinter callback
Traceback (most ...
2
votes
2answers
143 views
Errno 34: Results too large when loop printing datetime.now()
This is probably a simple fix but it doesn't happen consistently so I can't figure it out.
I have a while loop that repeats if the count is less than the total. When the first loop starts, it saves ...
-1
votes
3answers
108 views
python 'with open(file)' statement does not close file after editing
I am on windows and want to run my multi-threaded python app that saves data to .csv in an async way. As reported here, here and here, I am getting the following error at some point:
<type '...
0
votes
0answers
47 views
vb.net USB flash drive IO error device not ready
I have an app that searches for drives that begin with "CVD". The user will have multiple flash drives that I pull data from when inserted in to PC. This works perfectly on my development PC, but when ...
1
vote
2answers
47 views
Errno 2 file not found when calling a function from a different .py file
I made a function that reads from a file and saves it's data in an array.
This function is in Posts.py:
index = 'Forum/Topics/index.txt'
def loadTopicNames():
with open(index, 'r') as file:
...
0
votes
1answer
2k views
make a new connection with Oracle sql developer
I know this question has been asked frequently. However, none of the answers from them worked for me. So, I am posting the question. I tried to make a new connection in sql developer using my Oracle ...
0
votes
1answer
29 views
Python IDE creates folder after which it has no permission to (write or read)
In a project I have a function that creates a folder when it doesn't exist yet with the os package.
Now I run into the error then when this folder is created (I run the script with the IDE pycharm) ...
3
votes
1answer
2k views
Cannot restart Docker container due to input/output error?
I noticed my Redis instance on my local pc stopped working. I use Docker to host it and tried to issue a restart command on the container as ps stated it was running*.
docker restart my-redis
...
0
votes
0answers
523 views
Python: IOError: [Errno 0] Error when reading JSON
I have the following code, which takes some JSON data, reads it into a dictionary, does some manipulation, then writes it back.
import json
file = open('data.json', 'r+')
data = json.loads(file.read(...
0
votes
1answer
89 views
Skip the first N lines and print the rest of the file, given there is a file corruption in the middle of the file
I have a large text file that is corrupted in the middle When I attempt to read this file, say find the number of lines using awk:
person@terminal> awk 'END{print NR}' file.txt
awk: (FILENAME=file....
1
vote
1answer
2k views
_io.TextIOWrapper' object is not callable
I am trying to print to write to a file what type of shipping and item has
from bs4 import BeautifulSoup
from selenium import webdriver
stock_file = r"C:\Users\Tut10\Desktop\PSTool-Python\Final\test....
0
votes
0answers
255 views
sftp rename IOError(u'Failure',)
I'm using sftp python library to upload and rename a file. The upload process is successful but when I try to execute the rename method I get IOError(u'Failure',). Has anyone any idea of why is this ...
0
votes
1answer
88 views
How to handle “ERROR: IOError: closed stream” in Golang scan function?
I am using knife bootstrap command in Golang code to bootstrap nodes. Some times there is wait in recipe and it waits for more than 10 minutes. In such cases I am getting an error "Error: IOStream ...
1
vote
0answers
2k views
H5PY IOError: Unable to open file (File signature not found)
I'm having problems opening .h5 files.
I've googled around and messed about with keras but still no luck.
Here's my code :-
and this is giving me an error of :-
import numpy as np
import ...
-2
votes
1answer
31 views
IOError: No suitable library found for xls
Working on a project that uses pyexcel to read and write .xls files which is compiled using py2exe.
I get this error after compiling and confirming that pyexcel, pyexcel-io and pyexcel-xls are in the ...
1
vote
2answers
362 views
Python subprocess.Popen error handling with shell=True/False issues
I am trying to get some error handling for the following code.
In the line subprocess.Popen...... if the shell=True the script will encrypt if a correct file name is given, however there is no file ...
2
votes
2answers
1k views
python pysftp [Errno 13] Permission denied:
I'm trying to copy files from SFTP server .
I can connect using python pysftp .
I can run:
data = srv.listdir()
for i in data:
print I
And I get the Directory list. But when I try
sftp.put (...
1
vote
1answer
88 views
IO error after I change my template settings
Im new to django, I am trying to make an e-commerce site. Since I always received errors each time I try to do makemigrations I have removed TEMPLATE_DIRS and included it to TEMPLATES settings are ...
0
votes
1answer
78 views
Powershell Get-Content with Wait flag and IOErrors
I have a PowerShell script that spawns x number of other PowerShell scripts in a Fire-And-Forget way.
In order to keep track of the progress of all the scripts that I just start, I create a temp ...
1
vote
1answer
2k views
Pygame IOError, unable to read Font File
I recently downloaded a font for a game im making in Pygame, but when the prompt where the font is used is meant to pop up, an error is displayed instead.
The error reads:
Traceback (most recent ...
0
votes
1answer
354 views
“ValueError: I/O operation on closed file” when calling subprocess
I am just trying to call tracert and get the result as a string. It seems the tracert call is working correctly, because the result is displayed on the console before the error occurs.
import ...
-1
votes
2answers
490 views
IOError: [Errno 2] No such file or directory – os.walk
I'm trying to run the following script which simply reads and image and saves it again:
from PIL import Image
import os
rootdir = '/home/user/Desktop/sample'
for subdir, dirs, files in os.walk(...
2
votes
1answer
1k views
Unittest for IOError exception handling
Given this code:
try:
#do something
except IOError as message:
logging.error(message)
raise message
I want to test the exception handling part in order to have full ...
3
votes
1answer
287 views
Try Catch not catching “error : unknown IO error” - I/O warning : failed to load external entity
The code underneath is part of a function.
The getLatestFileName function gets a correct fileName (locally stored).
The error is caused by the tryCatch expression: result <- try(xbrlDoAll...)
Even ...
1
vote
0answers
199 views
Python | IOError Directory File Not Found [duplicate]
I am beyond confused on why it is not finding the file. Below is the code where the error is. Even though secrets.json is in the same directory as the script I am working on, I get this error: "...
0
votes
2answers
39 views
IOError on csv load in Python 2
I'm trying to load a csv into Phython 2 using Anaconda with the following code:
pd.read_csv('C:\Users\thakuar1\Desktop\Machine_Learning\at_LoanStats3a_20170620_v12.csv')
but keep running into the ...