search for: unseri

Displaying 20 results from an estimated 105 matches for "unseri".

Did you mean: unser
2018 Nov 07
2
error unserializing ascii format (v2 or v3)
I ran into an interesting error unserializing a file created with ascii=TRUE: R 3.5.1 (Windows or Linux): > unserialize(serialize(list(raw=as.raw(c(39,41))), NULL, version=2, ascii=TRUE)) Error in unserialize(serialize(list(raw = as.raw(c(39, 41))), NULL, version = 2, : ReadItem: unknown type 29, perhaps written by la...
2018 Nov 08
0
error unserializing ascii format (v2 or v3)
I see this on MacOS as well, so likely not platform dependent. A little more diddling to try to narrow it down: > unserialize(serialize(as.raw(1), NULL, version=2, ascii=TRUE)) [1] 30 > unserialize(serialize(list(as.raw(1)), NULL, version=2, ascii=TRUE)) [[1]] [1] 30 > unserialize(serialize(list(raw=as.raw(1)), NULL, version=2, ascii=TRUE)) Error in unserialize(serialize(list(raw = as.raw(1)), NULL, version =...
2011 Dec 06
1
unserialize and eager execution
Hi, While debugging a network server I'm developing I noticed something unusual - call to unserialize() resulted in an error about loading a namespace. I was a bit taken back by this - why should unserializing an object cause a namespace lookup? Are there any other side-effects of unserialize() that I should be cautious about? I've been digging through the R_Unserialize() call, I haven...
2020 Oct 29
2
Something is wrong with the unserialize function
...vector on the worker clusterEvalQ(cl, x) stopCluster(cl) ``` you can find more info on the problem if you manually build a connection between two R processes and export the ALTREP object. See output below ``` > con <- socketConnection(port = 1234,server = FALSE) > gctorture() > x <- unserialize(con) Warning message: In unserialize(con) : cannot unserialize ALTVEC object of class 'mmap_real' from package 'simplemmap'; returning length zero vector ``` It seems like simplemmap did not get loaded correctly on the worker. If you run `library( simplemmap)` before unseria...
2018 Jun 21
1
DOCUMENTATION(?): parallel::mcparallel() gives various types of "Error in unserialize(r) : ..." errors if value is of type raw
I stumbled upon the following: f <- parallel::mcparallel(raw(0L)) parallel::mccollect(f) # $`77083` # NULL but f <- parallel::mcparallel(raw(1L)) parallel::mccollect(f) # Error in unserialize(r) : read error traceback() # 2: unserialize(r) # 1: parallel::mccollect(f) (restarting because the above appears to corrupt the R session) f <- parallel::mcparallel(raw(2L)) parallel::mccollect(f) # Error in unserialize(r) : unknown input format I can reproduce this on Linux using R 3.5...
2020 Oct 29
2
[External] Something is wrong with the unserialize function
...` > > you can find more info on the problem if you manually build a connection > between two R processes and export the ALTREP object. See output below > ``` >> con <- socketConnection(port = 1234,server = FALSE) >> gctorture() >> x <- unserialize(con) > Warning message: > In unserialize(con) : > cannot unserialize ALTVEC object of class 'mmap_real' from package > 'simplemmap'; returning length zero vector > ``` > It seems like simplemmap did not get loaded correctly on the wor...
2020 Oct 29
0
[External] Something is wrong with the unserialize function
...> stopCluster(cl) > ``` > > you can find more info on the problem if you manually build a connection > between two R processes and export the ALTREP object. See output below > ``` >> con <- socketConnection(port = 1234,server = FALSE) >> gctorture() >> x <- unserialize(con) > Warning message: > In unserialize(con) : > cannot unserialize ALTVEC object of class 'mmap_real' from package > 'simplemmap'; returning length zero vector > ``` > It seems like simplemmap did not get loaded correctly on the worker. If > you run `li...
2012 Jan 09
1
serializing recordedplot object
I use recordPlot() to save plots to disk that I render later to a variety of formats. This works fine for base R plots and ggplot2 plots, and also used to work for lattice plots. However somewhere in version 2.14 things stopped working for lattice plots. Here is an example: library(lattice); histogram(rnorm(100)); x <- recordPlot(); saveRDS(x, "myplot.rds"); y <-
2011 Sep 28
1
serialize/unserialize vector improvement
Hi folks, I've attached a patch to the svn trunk that improves the performance of the serialize/unserialize interface for vector types. The current implementation: a) invokes the R_XDREncode operation for each element of the vector type, and b) uses a switch statement to determine the stream type for each element of the vector type. I've added R_XDREncodeVector/R_XDRDecodeVector functions that a...
2020 Oct 29
0
[External] Something is wrong with the unserialize function
...you can find more info on the problem if you manually build a connection > > between two R processes and export the ALTREP object. See output below > > ``` > >> con <- socketConnection(port = 1234,server = FALSE) > >> gctorture() > >> x <- unserialize(con) > > Warning message: > > In unserialize(con) : > > cannot unserialize ALTVEC object of class 'mmap_real' from package > > 'simplemmap'; returning length zero vector > > ``` > > It seems like simplemmap did not get loa...
2013 Jul 15
2
Serialize data.frame to database
...t;simID" INT, "data" TEXT DEFAULT NULL)') dbSendQuery(db, paste("INSERT INTO frames VALUES(1, '", data.raw, "')", sep = "")) data.bin2 <- dbGetQuery(db, "SELECT data FROM frames WHERE simID = 1") Nice, that worked. Now I want to unserialize the data: unserialize(data.bin2) Error in unserialize(data.bin2) : 'connection' must be a connection unserialize(data.bin2[1, 'data']) Error in unserialize(data.bin2[1, "data"]) : character vectors are no longer accepted by unserialize() I feel a little stuck her...
2005 Dec 12
2
Can you unserialize an object from the db?
...possible. I want to use an object as an attribute for one of my classes. I can save it to the db fine, looks like...but I need to be able to use it after I pull the object from the db. Right now the attribute is just a String, but I need it to be a Runt::Intersect object. Does anyone know how I can unserialize the attribute so I can use it as an object?
2008 Sep 25
1
Saving R-objects to a database
...runcated) 2) ser = serialize(obj, NULL) dbSendQuery(link, paste("insert into table values(1, '",ser,"')",sep='')) The field to save the object in the MySQL Database is of type blob. result = dbGetQuery(link,"select * from table where id=1") unser = unserialize(result[1,"object_column"], NULL) Error in unserialize(result[1, "object_column"], NULL) : unknown input format In addition: Warning message: In unserialize(result[1, "object_column"], NULL) : unserialize()from a character string is deprecated and will be with...
2008 Jul 31
2
C versions of serialize/unserialize in packages
Are the functions 'R_Unserialize' and 'R_InitFileInPStream' allowed to be used in R packages? I guess I'm just not clear on the implications of this comment in 'Rinternals.h': /* The connection interface is not yet available to packages. To allow limited use of connection pointers this defines th...
2012 Aug 31
3
Arrays Partial unserialization
...load several ones to apply some functions that requires to have all my arrays values for each cell... To make it possible, I would like to load only a part (for example 100 cells) of all my arrays, apply my function, delete all cells loaded, loaded following cells and so on. Is it possible to unserialize (or load) only a defined part of an R array ? Do you know some tools that might help me? Finally, I did lot of research to find the way array (and all other R object) are serialized into binary object, but I found nothing explaining really algorithms involved. If someone has some informatio...
2010 Jul 17
1
bug in identical()? [Was: [R-sig-ME] Failure to load lme4 on Mac]
...iel, thanks for the test case. I did run it in valgrind but nothing showed up, however ... I'm starting to have a suspicion that this has something to do with identical() - look at this: > identical(M1,M2) [1] FALSE > all(serialize(M1,NULL)==serialize(M2,NULL)) [1] TRUE > identical(unserialize(serialize(M1,NULL)),unserialize(serialize(M2,NULL))) [1] FALSE > identical(unserialize(serialize(M1,NULL)),unserialize(serialize(M1,NULL))) [1] FALSE So I think this may be a bug in identical() mainly because of the last one. I'll need to take identical() apart to see where it fails .....
2008 Nov 30
1
Rserve and creating a list of lists
Hello, I have some code which generates lattice objects. The function recieves serialized forms of the lattice objects which it then unserializes and then adds to an ArrayList<REXP>. REXPRaw rser = new REXPRaw( target ); //target contains the raw serialized forms of lattice objects rconn.assign("temp",rser); REXP ret = rconn.eval("invisible(unserialize(temp))"); (1) rexpArr.add(ret); RList rlist = ne...
2024 May 13
1
[External] R hang/bug with circular references and promises
...e: > Looks like I added that warning 22 years ago, so that should be enough > notice :-). I'll look into removing it now. Dear Luke, I've got a somewhat niche use case: as a way of protecting myself against rogue *.rds files and vulnerabilities in the C code, I've been manually unserializing "plain" data objects (without anything executable), including environments, in R [1]. I see that SET_ENCLOS() is already commented as "not API and probably should not be <...> used". Do you think there is a way to recreate an environment, taking the REFSXP entries...
2006 May 19
2
Icecast2 Status Page Parser
Does anyone have a Perl or PHP Icecast2 Status Page Parser? Thanks. -greg. __________________________________________________________________________ Greg J. Ogonowski VP Product Development ORBAN / CRL, Inc. 1525 Alvarado St. San Leandro, CA 94577 USA TEL +1 510 351-3500 FAX +1 510 351-0500 greg@orban.com http://www.orban.com
2013 Mar 05
0
unserializing hash with unquoted strings
Hi all, I''ve recently upgraded a rails 3.0.20 app to 4.0.0.beta1 and realize that the serialize function must have changed in between (not sure if related to json security fixes). In the MySQL database I have for the serialized column: --- id: 6695079125_10151776148744126 In rails 3 this would be parsed back as string ("6695079125_10151776148744126") while in rails 4