Questions tagged [errno]

errno is an integer variable, which is set by system calls and some library functions in the event of an error to indicate what went wrong. Its value is significant only when the return value of the call indicated an error.

errno is an integer variable, which is set by system calls and some library functions in the event of an error to indicate what went wrong. Its value is significant only when the return value of the call indicated an error.

559 questions
-1
votes
2 answers

python image unable to load using google colab environment FileNotFoundError: [Errno 2] No such file or directory:

I try to load python image in google colab environment. But it's failed due to FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/My Drive/path_to_image/img.jpg' I already uploaded image into google drive. how to fix this…
-1
votes
2 answers

Errno 111 Connection refused - Python Mininet API hosts client/server no connection?

I am new to Mininet and I am trying to find a way to use a script in python to execute a few tests using Mininet. More precisely I want to build topology and send a few xmlrpc request from one host to another. I've recently found how to use…
TassosK
  • 293
  • 3
  • 16
-1
votes
1 answer

SMTP send: "getaddrinfo failed"

import smtplib def sendEmail(receiver,subject,message): server = smtplib.SMTP('smtp.gamil.com',587) server.ehlo() server.starttls() server.login("botsinhala@gmail.com",password) …
-1
votes
1 answer

FileNotFoundError: [Errno 2] No such file or directory: 'apempe_chunks.txt'

The whole error: C:\Users\Desktop\texts>python similarity1.py Traceback (most recent call last): File "similarity1.py", line 19, in documents = [open(f, encoding="utf-8").read() for f in text_files] File "similarity1.py", line 19,…
lynx
  • 180
  • 16
-1
votes
2 answers

How should a C library manage errors?

I’m creating my own C library and I came across a dilemma. What value should library function return? Should I have my own errno variable, and then functions return 0 for success and -1 for failure and set errno to the specific error? (like most of…
Tal Avraham
  • 300
  • 1
  • 6
-1
votes
1 answer

Python3 Wolframalpha Giving Error: urllib.error.URLError

Alright so a few days ago I wrote this code and it worked fine. import wolframalpha app_id = "MY-APP-ID-HERE" client = wolframalpha.Client(app_id) my_input = input("Question: ") res = client.query(my_input) Then today it just stopped working,…
techset
  • 7
  • 8
-1
votes
1 answer

How to access errno after using syscall?

I'm using syscall stat, it returns 0/-1. When -1 is returned it means, error occurred and errno is set as it should be (source: man 2 stat). But I want to access errno and print it, how to do that?
-1
votes
1 answer

Why ftell prints -1 as value of file pointer? And why errno prints out "INVALID ARGUMENT"?

I have these 2 functions in a project which loads and saves user's information into a file. Each user is saved in a new line of the file. My problem is that the program crashes when I try to use ftell(f). When I print ftell(f) it prints -1 after…
-1
votes
2 answers

How to resolve Errno 13 Permission Denied

I have researched the similarly asked questions without prevail. I am trying to os.walk() a file tree copying a set of files to each directory. Individual files seem to copy ok (1st iteration atleast), but an error is thrown (IOError: [Errno 13]…
Noah Huntington
  • 409
  • 2
  • 5
  • 17
-1
votes
1 answer

shared errno for server/client?

Using remote procedure calls, how can we have shared errno for the server side and client machines? To clarify, here is the context of my question: I am trying to implement a distributed file system. I aim for a centralized design where I keep…
KJohn
  • 193
  • 1
  • 1
  • 15
-2
votes
2 answers

OpenMP: parallel op and errno at once?

While omp_thread_num is maintained for a full iteration, the same underlying thread won't necessarily perform the execution. This made me wonder how omp deals non omp thread locals, i.e. __thread int; or errno, which are thread local to the…
midjji
  • 394
  • 3
  • 9
-2
votes
2 answers

Error on file open: File exists

The return value of an open() was -1 and on trying to find the error using perror() the output was "File exists". How do I find the error or the reason for the file not opening.
Lipika Deka
  • 3,774
  • 6
  • 43
  • 56
-2
votes
1 answer

what is if(errno != EEXIST) in c?

what is errno and EEXIST mean? #include if(errno != EEXIST) { perror(sha1_dir); exit(1); } I can't understand the condition of if statement. is that saying "if errno doesn't exist"?
woowoo
  • 117
  • 1
  • 6
-2
votes
1 answer

What is this error ? It's an digital assistant

This is my code: import speech_recognition import pyttsx3 from datetime import date, datetime robot_ear = speech_recognition.Recognizer() robot_mouth = pyttsx3.init() robot_brain = "" while True: with speech_recognition.Microphone() as mic: …
-2
votes
1 answer

Atomics and `errno`: is it reasonable to use C++11 atomics to read a protected errno value?

Handling errno is one of the struggle of using POSIX API over a multithreaded environment. Would it be reasonable to use a lock using std::atomic like the following one? class FastLock{ std::atomic_int value; public: FastLock() :…
1 2 3
37
38