search for: tempfile

Displaying 20 results from an estimated 686 matches for "tempfile".

2011 Mar 18
1
[Patch suggestion] Adding 3rd arg to tempfile() to set extension
The other day I was working on an example which used tempfile() to create file for use by the graphics device. And while I love tempfile()---as it is portable and clever and the files get cleaned by R and all that---I noticed one missing feature I would like to see: beside a starting name pattern, and an optional directory, an 'file extension' argumen...
2010 Jun 17
2
tempfile problem
G'day all, The documentation for tempfile states : "The names are very likely to be unique among calls to tempfile in an R session and across simultaneous R sessions. The filenames are guaranteed not to be currently in use." My problem I think relates to the second part of the sentence, which is the guarantee... and it is being...
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all, Yesterday, I had some problems reading JPG files in my tests. Turns out the problem was that Windows Ruby doesn't set it's Tempfile to work in binary mode. Since I deploy on Linux, that has never been a big problem, but now I'm working on some software that works with binary files exclusively. Anyway, I am making this fix available as a Rails plugin. The details can be found here: http://blog.teksol.info/articles/2006/12...
2006 Dec 08
2
Windows Tempfile Fix Plugin
Hi all, Yesterday, I had some problems reading JPG files in my tests. Turns out the problem was that Windows Ruby doesn't set it's Tempfile to work in binary mode. Since I deploy on Linux, that has never been a big problem, but now I'm working on some software that works with binary files exclusively. Anyway, I am making this fix available as a Rails plugin. The details can be found here: http://blog.teksol.info/articles/2006/12...
2010 Sep 23
3
superclass mismatch for class Tempfile
I''ve been facing a problem when generating a model (or controller, ...). I''m using rails 2.3.8 and ruby 1.8.7. Has anybody been facing anything like this? script/generate controller test /usr/lib/ruby/1.8/tempfile.rb:12: superclass mismatch for class Tempfile (TypeError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /usr/lib/ruby/gems/1.8/gems/activesuppo...
2020 May 30
4
r-project.org SSL certificate issues
On macOS 10.15.5 and R-devel: > download.file("https://www.r-project.org", tempfile()) trying URL 'https://www.r-project.org' Error in download.file("https://www.r-project.org", tempfile()) : cannot open URL 'https://www.r-project.org' In addition: Warning message: In download.file("https://www.r-project.org", tempfile()) : URL 'https://...
2000 Dec 20
1
unlink() is not synchronized with existing connections (PR#783)
> # creating a file > cat("sddfasdf", file="tempfile") > showConnections() class description mode text isopen can read can write > con <- file("tempfile", "r") > readLines(con) [1] "sddfasdf" Warning message: incomplete final line in: readLines(con, n, ok) > showConnections() class descr...
2006 Mar 16
6
File Auditing with rails - File I/O issue
...ght think. ?The script completes, but seems to not actually write anything. Here is a short version that only looks at the C:/temp drive. ?You can change this at the top. ---Start Code Here-- require ''find'' require ''csv'' require ''zlib'' tempfile = "temp.csv" outfile ?= "out.zip" dirname = "c:/temp" # Prepare comma-delimited file for writing CSV::Writer.generate(File.open(tempfile,"w+"), '','') do |csv| ? ? ? Find.find(dirname) do |f| ? ? ? ? ? csv << [File.dirname(f), File...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Default to mktemp, not tempfile
...0626ba1febdb535a674743070dfc3f3c5735b29 Author: Andrej Shadura <andrew.shadura at collabora.co.uk> AuthorDate: Fri, 7 Sep 2018 10:34:11 +0200 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: builtin: Default to mktemp, not tempfile [ dash commit ad072645af04c31300c84d2840fcf1a8d48588ec ] Don't use tempfile, as it currently runs tempnam(), which is insecure and fails under pseudo(1). Signed-off-by: Andrej Shadura <andrew.shadura at collabora.co.uk> Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> S...
2017 Apr 26
2
tempdir() may be deleted during long-running R session
...opular) "Systemd": $ mkdir /tmp/somedir $ touch -d "12 days ago" /tmp/somedir/ $ cd /tmp/somedir/ $ sudo systemd-tmpfiles --clean $ ls /tmp/somedir/ ls: cannot access '/tmp/somedir/': No such file or directory I would advocate just changing 'tempfile()' so that it recreates the directory where the file is (the "dirname") before returning the file path. This would have fixed the issue I ran into. Changing 'tempdir()' to recreate the directory is another option. Thanks, Frederick
2010 May 25
8
Unable to execute a script , Permission denied
Hi I have a linux box which has CentOS running in it. I logged into the box using root and wrote a script in the /home/proc_threads directory. saved the file and quit. I changed the file permissions such that any user could execute it using the "chmod 777 filename" command. When i log out and log in as a non-root user i was not able to execute the script though. Could some one
2017 Sep 08
3
file.copy(from=Directory, to=File) oddity
...mistakenly use file.copy() with a directory for the 'from' argument and a non-directory for the 'to' and overwrite=TRUE, file.copy returns FALSE, meaning it could not do the copying. However, it also replaces the 'to' file with a zero-length file. dir.create( fromDir <- tempfile() ) cat(file = toFile <- tempfile(), "existing file\n") readLines(toFile) #[1] "existing file" file.copy(fromDir, toFile, recursive=FALSE, overwrite=TRUE) #[1] FALSE readLines(toFile) #character(0) or, with recursive=TRUE, dir.create( fromDir <- tempfile() ) cat(file = t...
2005 Jul 06
4
Tempfile error
Dear List: I am encountering an error that I can't resolve. I'm looping through rows of a dataframe to generate individual tex files using Sweave. At random points along the way, I encounter the following error Error in file() : cannot find unused tempfile name At which point Sweave halts. There isn't a logical pattern that I can identify in terms of why the program stops at certain points. It just seems to be random as far as I can tell. I've searched the archives and of course Sweave FAQs but haven't found much that sheds light on what...
2005 Jul 08
1
Possible Solution to Tempfile error (for documentation)
...he solution is more of a cheap hack that works for now. To provide a little background, I am looping through a dataframe and creating Sweave documents using data from each row in the dataframe. It appears that this technique is not scalable to large dataframes without making some changes to the way tempfiles are handled. In the background, R generates tempfiles in a directory using a sequential number. In my case, the numbers ranged from Rf1 to Rf32767. The next in line would of course be Rf32768. This number happens to coincide with 2^15-1, which my programmer colleagues tell me is the maximum posit...
2006 May 30
2
Mongrel Bug
Mongrel''s tempfile generation on win32 is broken meaning large files can''t be uploaded. On line 198 of mongrel.rb (0.13.3) HttpRequest#initialize the tempfile function is called:       if clen &gt; Const::MAX_BODY         @body = Tempfile.new(self.class.name)         @body.binmode       else Unfort...
2009 May 27
0
request.raw_post into Tempfile
i have flash application ,which will give a jpg file as raw_post from that raw_post i am trying to store into a tempfile tempfile=Tempfile.new("myfile.jpg") tempfile.write(request.raw_post) but always "tempfile.read" giving ""(not storing the data) as output i don''t why ? any help ? -- Posted via http://www.ruby-forum.com/.
2017 Apr 26
6
tempdir() may be deleted during long-running R session
...= TRUE) would create a new > one or give an error (and then the user should be able to use > Sys.setenv("TEMPDIR" ...) > to a directory she has write-permission ) > > Gabe's point of course is important too: If you have a long > running process that uses a tempfile, > and if "big brother" has removed the full tempdir() you will > be "unhappy" in any case. > Trying to prevent big brother from doing that in all cases seems > "not easy" in any case. > > I did want to provide an easy solution to the OP situation:...
2011 Mar 30
2
problem with png() and large dimensions on some 32-bit Windows machines
Hello, I encountered this: > png(file=tempfile(), width=1165, height=12983) Error in png(file = tempfile(), width = 1165, height = 12983) : unable to start png() device In addition: Warning messages: 1: In png(file = tempfile(), width = 1165, height = 12983) : Unable to allocate bitmap 2: In png(file = tempfile(), width = 1165, height = 129...
2017 Nov 09
10
Experiment on how to improve our temporary file handing.
Currently a power failure or other hard crash can cause lld leave a temporary file around. The same is true for other llvm tools. As an example, put a breakpoint in Writer.cpp:236 ("writeBuildId()") and restart the run a few times. You will get t.tmp43a735a t.tmp4deeabb t.tmp9bacdd3 t.tmpe4115c4 t.tmpeb01fff The same would happen if there was a fatal error between the
2020 May 30
2
r-project.org SSL certificate issues
...forgiving. On Sat, May 30, 2020 at 5:01 PM peter dalgaard <pdalgd at gmail.com> wrote: > > Odd. Safari has no problem and says certificate expires August 16 2020, but I also see the download.file issue with 4.0.1 beta: > > > download.file("https://www.r-project.org", tempfile()) > trying URL 'https://www.r-project.org' > Error in download.file("https://www.r-project.org", tempfile()) : > cannot open URL 'https://www.r-project.org' > In addition: Warning message: > In download.file("https://www.r-project.org", tempfile...