Questions tagged [stderr]

The standard error output stream (stderr) is typically used by a program to output error messages or diagnostics.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

Missing Separation Names in stdout/stderr

The actual gs documentation says: The tiffsep device also prints the names of any spot colors detected within a document to stderr, (stderr is also used for the output from the bbox device). For each ...
Alex's user avatar
  • 11
0 votes
1 answer
34 views

How add timestamp to rust stderr

I use tokio for async code and env_logger to stdout. So in stdout clear when the event took place: [2023-11-29T02:30:03Z INFO myapp] connected success But in stderr only: Error: Io(Os { code: 111, ...
ggoha's user avatar
  • 2,036
1 vote
1 answer
51 views

awk returns two different outputs for the same input

I'm trying to get first field value using awk field separator, but it is failing as below. Same is working fine when i'm trying with echo manually. Fail Case 1: [root@centos ~]# ssh -V | awk -F_ '{...
isrikanthd's user avatar
0 votes
0 answers
36 views

How can I print to `sys.stderr` in Cython? [duplicate]

How can I print to sys.stderr in Cython? This is my tmp_cpp.pyx file: # tmp_cpp.pyx # cython: language_level=2 import sys import traceback cimport cython @cython.boundscheck(False) @cython.wraparound(...
cat's user avatar
  • 59
1 vote
0 answers
41 views

I'm having trouble with the passthru() function when redirecting stderr to stdout

Could you help me with this strange passthru() behavior? This code writes the "Division by zero" error to test.log: passthru('php -r "echo 1/0;" 2>logs/test.log >> logs/...
Daniel C.'s user avatar
0 votes
0 answers
22 views

Can an AWS Lambda bash bootstrap capture both stdout and stderr?

I've seen similar questions on being able to get stderr from lambda in AWS, but instead I'd like the handler to include stderr in the output. This basic bootstrap bash function similar to what aws ...
openCivilisation's user avatar
1 vote
1 answer
53 views

How to create custom file descriptors on linux besides stdout/stderr?

I want to create a special file descriptor to co-exist along /dev/std{in,out,err}. For example, lets say /dev/fd/3 and /dev/customout are created and all programs and scripts can use it in the same ...
Elfen Dew's user avatar
  • 156
0 votes
1 answer
61 views

Running exec("nohup curl ...") in PHP and redirecting stderr

I have a piece of php code that executes multiple curl request using the exec() function. The goal is to download a lot of files simultaneously, at the same keep track of the PIDs as well as the ...
albertma789's user avatar
0 votes
0 answers
27 views

Redirect zephyr LOGS statements to host stderr

When executing a zephyr app like a native_posix application is it possible to have LOG statement redirected to stderr, while printk statements goes to stdout ?
gtosto's user avatar
  • 1,391
0 votes
2 answers
59 views

Why does `lspci --help | grep driver` fail?

lspci --help | grep driver fails for some reason, it simply prints out the output instead of getting filtered by grep. If I run lspci --help | grep driver I get: lspci: invalid option -- '-' Usage: ...
CreeLoPer27's user avatar
1 vote
2 answers
91 views

How is restic outputting data to the screen but not to stdout or stderr?

Updating line I have a question about where the output of a certain command is going. I'm using restic as an example of a command that behaves this way. It's the last line of the command that's of ...
Matt's user avatar
  • 9,168
1 vote
3 answers
50 views

How to capture live packet count from tshark's stderr?

Tshark prints the packet count about two times per second to stderr when recording to a file. However, it appears to be missing when attempting to monitor the stderr stream from another program. A ...
Sambo's user avatar
  • 11
-1 votes
2 answers
83 views

Python logging check if errors occured

I use logging.basicConfig(format='%(levelname)s %(asctime)s %(message)s', level=logging.INFO) to activate logging of INFO and higher logging levels. Is there a possibility to check at the end of my ...
Daniel's user avatar
  • 1
0 votes
1 answer
44 views

Deadlock/hanging while reading from a subprocess's stderr in thread - with consideration of KeyboardInterrupt and SystemExit

I'm using Popen from Python's subprocess module to start a subprocess, and also running another thread to capture its standard error. I suspect that the Popen context hangs on exit of the context if ...
Michal Charemza's user avatar
0 votes
1 answer
25 views

R progress bar not captured in log file when directed from bash

In linux, when I am re-routing the output of an R code which contains a progress bar (from progressr package), the progress bar is not captured in the log file (i am monitoring the log file with tail -...
Burak Oker's user avatar
0 votes
0 answers
18 views

Redirecting output from R - doesn't seem to work for library(moments)

I'm trying to get a clean output, using the cli (bash). It mainly works - but, for some reason, I can't catch the output from 'library(moments)': (R --slave 2>/dev/null <<@@END ...
Peter Brooks's user avatar
0 votes
0 answers
26 views

macOS app that works as both commandline and GUI app, how can I suppress system log output to stderr?

I'm an old programmer teaching myself macOS and making tools for my own use. I've got an app working that launches a GUI conditionally, but when it launches the GUI, the system prints logging info to ...
hippietrail's user avatar
  • 16.1k
1 vote
1 answer
31 views

NativeCommandError while trying to combine output streams

Doing a Start-Transcript to capture logs from a node program. After starting the transcript the following command is entered: PS > node . 2>&1 The above program outputs everything to ...
deostroll's user avatar
  • 11.8k
0 votes
0 answers
13 views

C70__PACKET not found in mediapipe library in python

i am making a landmark detection of hand using mediapipe library of python and this is the code i wrote : import cv2 import mediapipe as mp import time class handDetector(): def __init__(self, ...
windoser's user avatar
1 vote
0 answers
95 views

Laravel and Monolog: Why do I get 'WARN' message on STDOUT with 'stderr' channel?

I have a question about why Monolog on Laravel shows "WARN" message on STDOUT. How can I avoid it? I'm running a new Laravel 10 project. I've created a RequestLogger middleware which ...
Guanart's user avatar
  • 11
2 votes
1 answer
82 views

How can I remove swift process message

Whenever I run the following code, a sound is played perfectly fine but it always prints something to the console. code: let path = Bundle.main.bundlePath let task = Process() task.launchPath ...
meep's user avatar
  • 23
0 votes
0 answers
151 views

Writing to stderr using write() from thread

In a Qt/C++ application I need to use write() to print some text to stderr. I'm doing something like this multiple times: write(stdErrDescriptor, "H", 1); write(stdErrDescriptor, "e&...
Silicomancer's user avatar
  • 8,684
0 votes
1 answer
69 views

Redirect stderr with Flask and uWSGI

I have a simple Flask app with an error: from flask import Flask app = Flask(__name__) @app.route("/") def hello_world(): i = 1/0 return "<p>Hello, World!</p>" ...
blueblast's user avatar
0 votes
0 answers
88 views

Why GPG command doesn't allow me to grep on output or write its output into a file?

Say I want to find "AE09" within the output of this command with the line highlighted (classically). ~/Downloads$ gpg --verify sha256sum.txt.gpg sha256sum.txt gpg: Signature made Sun 18 ...
Aubergine's user avatar
  • 5,902
0 votes
1 answer
197 views

How to find where the sys.stderr is being printed in a Python module if it isn't showing up where expected?

I'm working on a python module and some functions in said module print the stdout and stderr to custom log files. # module_ex.py import sys def testfunc(errfile): sys.stdout = open(('stdout....
je_b's user avatar
  • 101
0 votes
1 answer
134 views

Suppress/redirect stack trace print out with logger.exception?

A great way to process exceptions is to use Logger.exception: try: do_something() except BaseException: logger.exception('some message') ... this not only prints out the user message, but ...
mike rodent's user avatar
  • 14.4k
0 votes
0 answers
86 views

Redirect stderr to file with pyinstaller

I try to create an error log for my compiled python project. If I use pyinstaller without the -w flag I can see an error message at crashes with the line number where the error occured. Unfortunately ...
ramsluk's user avatar
  • 124
0 votes
1 answer
80 views

Subsetting dataset vs Subsetting survey design object

I´m analyzing a couple of survey questions with the survey package. Since the questions of interest have only been asked in some of the data collection periods, I only need a subset of the entire ...
seb-29's user avatar
  • 51
0 votes
1 answer
30 views

How can I extract the error message from FILE *stderr and convert it into a string format?

In my unit test case I want to check if the error message (written to STDERR FILENO) of a (failing) function is correct. For this I need to extract the error message from the FILE *stderr and convert ...
Lucien van Bussel's user avatar
2 votes
1 answer
321 views

Statsmodels Clustered Logit Model With Robust Standard Errors

I have the following dataframe: df.head() id case volfluid map rr o2 fluid 1044 36 3 3.0 1.0 3.0 2.0 0.0 1045 37 3 2.0 3.0 1.0 2.0 ...
hulio_entredas's user avatar
0 votes
0 answers
59 views

Run a subprocess and show output in realtime AND log stderr

I am using python to run a subprocess that takes a while to execute, and that may or may not succeed. My question: How can I keep realtime output of the process AND collect error lines? Here is my ...
psychochair's user avatar
0 votes
3 answers
117 views

With perl open, how can I capture bash STDOUT & STDERR without printing to disk?

The perl script below invokes unix find using the open command. STDOUT goes into the CMD filehandle and STDERR, if any, goes into a temporary file on disk. STDERR will result if the user makes a ...
Jacob Wegelin's user avatar
1 vote
1 answer
97 views

Bash script. During execution - stdout + stderr in terminal, also stdout + stderr to file and again stderr to another file. Is that even possible?

I have written multi-os provisioning script for local and aws ec2 VMs. I want to achieve this behaviour of the script: Execution It shows stdout and stderr in terminal during execution Simultaneously ...
mono's user avatar
  • 13
3 votes
1 answer
755 views

Why is tqdm output directed to sys.stderr and not to sys.stdout?

Accordingo to the python python documentation concerning sys.stdou and sys.stderr: stdout is used for the output of print() and expression statements and for the prompts of input(); The interpreter’...
Heberto Mayorquin's user avatar
0 votes
1 answer
68 views

How can I only pipe the stdout to another command, and redirecting stderr to the standard out of the terminal?

I have a command foo whose stdout I want to pipe to another command bar, whose output I want to pipe to bas. If foo fails, I want to see it in the default standard out of the console. What is the best ...
Daniel Stephens's user avatar
0 votes
1 answer
523 views

subprocess to print stderr and stdout in real-time

Say I have this program printer.py: #!/usr/bin/env python3 import sys import time sys.stdout.write("STDOUT 1\n") time.sleep(1) sys.stderr.write("STDERR 2\n") time.sleep(1) sys....
dariober's user avatar
  • 8,510
0 votes
2 answers
270 views

Log stderr to file, prefixed with datetime

I do proper logging with the logging module (logger.info, logger.debug...) and this gets written to a file. But in some corner cases (external modules, uncaught exceptions, etc.), I sometimes still ...
Basj's user avatar
  • 42.4k
0 votes
1 answer
65 views

How can I redirect STDERR output to a variable or function to be later appended to a log file?

This is how I'm trying to redirect only the STDERR output from apt to a log file, while the apt progress report is visible on the terminal using function log_trace() twice: apt update 2> >(...
Rustam Alhas's user avatar
0 votes
0 answers
245 views

Python Subprocess.Popen stdout and stderr problems

I have created a script (x) that can start and stop some other scripts (y). The "y" scripts redirect sys.stdout = SomeClass() and sys.stderr = SomeClass(). SomeClass() simply sends a pyside6 ...
PythonCoder's user avatar
2 votes
1 answer
51 views

How to pass stderr to a command stream, then back to the terminal?

I'm using bash, but perhaps most shells behave similarly in this regard. If not, then my question pertains to bash. There's a regularly used command that always issues a spurious error message (to ...
Richard T's user avatar
  • 4,600
1 vote
1 answer
101 views

How do I get both STDOUT and STDERR to go to the terminal and a log file - and preserve stdout/stderr?

This is a follow-up to this question: How do I get both STDOUT and STDERR to go to the terminal and a log file? In short: I want to run a command and store both, STDOUT and STDERR in one log file (to ...
frans's user avatar
  • 9,118
0 votes
1 answer
275 views

stdout and stderr in c

Each time I start the program, the message "This message 2" is displayed in a random order relative to other messages. #include <stdio.h> int main() { fprintf(stdout,"This is ...
jir_jir123's user avatar
0 votes
2 answers
207 views

Is there a way to extract the first line from stderr and store it to a variable in the shell script executing the function?

Say I have a command I'm running in my script whose first line in stderr is something I need. I'm using stderr because stdout is already being used for transferring some other data. I still need the ...
Adrian's user avatar
  • 10.4k
0 votes
1 answer
41 views

How to pipe stderr while leaving stdout alone in ksh?

I'm using pax to backup a directory over a ssh link. If like to have a progress report saying how much of the transfer has occurred. With the -v option, it'll output the filename that it's done to ...
Adrian's user avatar
  • 10.4k
0 votes
0 answers
67 views

Assign stdout and stderr to a variable when sending output to a file with Subprocess in Python 2

# logging output and errors to file instead of PIPE # as when the output is over 64K the process can hang for a long time stdout_file = os.path.join("/var/log/", "migrate_stdout.log&...
crmpicco's user avatar
  • 16.8k
0 votes
0 answers
95 views

c# - Throwing Exceptions on Process and StandardOutput.ReadToEnd()

I'm currently in the process of creating a console application that acts as a Video Management Hub. I'm having issues with passing arguments into command line through process. Every time it returns ...
TreyLD's user avatar
  • 1
0 votes
0 answers
248 views

Docker doesn't show information on STDERR

I am trying to send the apache error logs to STDERR inside a docker container. Here's my site-config.conf file regarding the logs: <VirtualHost *:8008> ErrorLog ${APACHE_LOG_DIR}/test_error....
Infinite Possibilities's user avatar
0 votes
2 answers
408 views

how to capture the output that a function prints to the terminal in typescript/node

I am working with a typescript/node.js codebase, where there is a function that is called normally: func('param1', 'param2', param3') This function does not have a return value but it will print ...
Sabo Boz's user avatar
  • 1,975
0 votes
2 answers
49 views

Customised redirection of stderr?

I know that I can redirect the standard error output stream by: $ ./my-C-binary 2>error.log What if I want to ignore the first two characters of anything from stderr before writing to the file? I'...
FatArmpit's user avatar
2 votes
0 answers
72 views

Azure Pipeline SSH docker compose errors

When I run my Azure Pipeline job I can successfully execute this docker command via SSH. But when docker prints anything (e.g. update messages) the pipeline sees this as errors. I found out this is ...
mathijng's user avatar
  • 161

1
2 3 4 5
29