22 questions
0
votes
1
answer
74
views
Line break between consecutive error records missing when using Write-Error's -Exception parameter
Why do Windows PowerShell 5.1 and ISE display a line break between consecutive error records produced by Write-Error, but do not display a line break if the -Exception parameter is used? So far I ...
0
votes
1
answer
454
views
MongoDb schema validation error when schema specified ['string'] as bson type of attribute
I have a peice of python code which is using the PyMongo library to insert into my mongodb Collection hosted on MongoDB Atlas.
Im trying to insert the following doc into a collection called Customer ...
2
votes
1
answer
605
views
How do I actually generate an error using $PSCmdlet.WriteError in PowerShell?
I've been reading up on generating error messages in PowerShell and stumbled across this example...
$Exception = [Exception]::new("error message")
$ErrorRecord = [System.Management....
0
votes
1
answer
119
views
Why is insertMany function throwing error?
I am trying to add in details onto my mongodb cluster. Here is how I am trying to do:
async function insertDummyCategoryData(){
try{
await Category.insertMany([
{
"name&...
2
votes
2
answers
49
views
How can I resolve write errors that I have in my data?
I have a dataframe (more than 1 million rows) that has an open text columns for customer can write whatever they want.
Misspelled words appear frequently and I'm trying to group comments that are ...
1
vote
1
answer
507
views
Write-error gives weird characters when redirecting to a file in powershell core
Hello I have the following test code in powershell 7.1 and 7.2 preview.
Write-Output "Lalala" 1> C:\Temp\test.txt
Write-Error "This is a test" 2>&1 >> C:\Temp\test....
3
votes
2
answers
2k
views
Write-Error doesn't result useful information when used inside class methods | Powershell
I used a method with and without a class and the Write-Error seems to produce different outputs. In case of class, it doesn't specify the function and the line number is always 1,1
function oper1() {
...
1
vote
1
answer
564
views
Strange behaviour of Write-Error (PowerShell): no output from within methods with a return value
The output of Write-Error is ommited in methods that have a return value (i.e. are not void):
Class MyClass {
[void]MethodWithoutReturnValue([string]$Msg) {
Write-Error "MyClass....
0
votes
2
answers
1k
views
Spark: LeaseExpiredException while writing large dataframe to parquet files
I have a large dataframe which I am writing to parquet files in HDFS. Getting the below exception from logs :
2018-10-15 18:31:32 ERROR Executor:91 - Exception in task 41.0 in stage 0.0 (TID 1321)
...
2
votes
1
answer
2k
views
Document validation in MongoDB issue
So I'm very new to MongoDB and of course the feedback on when documents fail validation is somewhat... uninformative. So I'm hopeful anyone might see the error(s) I've made.
The schema is relatively ...
0
votes
1
answer
2k
views
PowerShell Write-Error
I have coded a simple Log function which calls cmdlet Write-Error. However, this produces some unexpected behavior. To give you an example:
function foo {
Param([string]$Msg = "This is an error")
...
1
vote
1
answer
3k
views
Writing ntag213 (Mifare Ultralight C) with mxgxw/MFRC522-python Library and MFRC522 Reader on Raspi 2
For a school project we are trying to write on ntag213 (Mifare Ultralight C 180Bytes) and we are not capable of writing on it. Beside of that the library is working fine with reading the Ultralight C/...
0
votes
2
answers
3k
views
arduino not writing to sd card
I have an Arduino with a Seeedstudio sd card shield v4.0 with a prototpye shield above that, and on that is a TMP36 temperature sensor and a red and two green LEDs, the red to show that it is "Ready" ...
2
votes
1
answer
801
views
Powershell Write-Error does not populate -ErrorVariable
I am running Powershell 4, and am trying to get an error variable to populate in a function by using the -ErrorVariable parameter in the call, and write-error within the function itself. However the ...
1
vote
1
answer
3k
views
usb4java Error while sending message: USB error 1: Control transfer failed: Input/Output Error
I try to send a message with the usb4java api to a ir read and write element with this code:
public static void sendData(DeviceHandle handle, int timeout) {
ByteBuffer buffer = ByteBuffer....
1
vote
2
answers
4k
views
MongoDB WriteError "code" : 9
I am trying to delete some records from MongoDB that have dirty values, but whenever I try to delete it, I am getting the writeError with code 9.
A sample of the dirty document is as follows:
{
"...
2
votes
1
answer
1k
views
Why is Write-Error displaying all code above it?
I was recently reading on reasons not to use Write-Host in PowerShell, so I've started using Write-Verbose, Write-Warning and Write-Output...but I'm having some issues with the output that I'm getting ...
0
votes
2
answers
736
views
Unity PersistentManager.WriteFile error
I have recently upgraded Unity to the 4.2.x series and I have run into a workflow problem that I am lost with. I have also tried this with the newest version (4.3.3f1) and I am also getting the same ...
2
votes
0
answers
361
views
CImg gives error Access violation writing location for reading PNG file
I try to run this very simple code and I get a strange error at the CImg library at line png_read_info(png_ptr,info_ptr); the error is: Unhandled exception at 0x779f8dc9 in test.exe: 0xC0000005: ...
0
votes
1
answer
2k
views
Program crash in forking process with pipes
I'm writing a basic shell for course homework that will find a command in the given list of paths, and execute the command. It is also meant to handle pipes.
However, when I fork a child process, I ...
0
votes
1
answer
2k
views
What could be causing this memory access error (C++)? Might be undefined behavior?
I have a relatively large class that I'm working with and it's all worked fine so far (note: I didn't actually write the class, I'm just adding some functionality). However, after declaring one more ...
16
votes
4
answers
58k
views
Writing to error stream in Powershell using Write-Error
Why isn't Powershell's Write-Error cmdlet working for me? My output doesn't look like the examples in the documentation:
PS C:\> Write-Error "This is an error"
Write-Error "This is an error" : ...