Automap library issue in Windows7 (with R 3.0.1) - windows

I installed sp and automap libraries to my R 3.0.1 64-bit under Windows 7 (via install.packages command). Installation of them did not display any error and library(sp) works fine however when I try to execute library(automap) I get the following error:
> library(automap)
Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning messages:
1: In read.dcf(file.path(p, "DESCRIPTION"), c("Package", "Version")) :
cannot open compressed file 'C:/Program Files/R/R-3.0.1/library/sp/DESCRIPTION', probable reason 'No such file or directory'
2: In gzfile(file, "rb") :
cannot open compressed file '', probable reason 'Invalid argument'
I looked from the path and indeed there is no DESCRIPTION file (or folder) in that path. However there is just libs folder under which folder x64 and inside it file sp.dll
Any idea what could cause this?

I would definitely try to run R as administrator, both for installing the packages and loading them. This could solve your problem.
This probably has to do with file permissions. When you install the packages as admin in a location where only admin can read/write, running R as a normal user means you do not have the file permissions needed to load the package. Running R as admin will solve this, as admin does have the correct permissions.
Alternatively, you could install your R packages in a location where a normal user has read/write persmissions, e.g. C:/Users/UserName (or something like that, I do not have my windows machine accesible right now).

Related

spyder: Windows permission errors when saving script

We've been trying to get spyder 5.1.5 to work inside a windows server environment (version 2012 and 2016). Before We've been using Spyder 3.3.6 successfully, but we want to upgrade to get "black/autopep8" autoformatting.
We have this distributed CIFS-like shared drive inside this server that has some strict permissions (but my username definitely has read/write/modify access at the level where the script is).
Unfortunately, when I try to get spyder to SAVE my code (and autoformat using black), I get the following (trimmed) error below. Basically spyder cannot save due to a permission error that doesn't make sense to me.
2021-12-08 18:23:52,005 [DEBUG] [spyder.plugins.completion.providers.languageserver.client] -> python Response error: {'code': -32602, 'message': "PermissionError: [WinError 5] Access is denied: '\\\\\\\\data-dist\\\\DataVol_014\\\\group\\\\users\\\\myusername\\\\myscript.py'", 'data': {'traceback': [' File "C:\\ProgramData\\Anaconda3\\envs\\py37-dev\\lib\\site-packages\\pylsp_jsonrpc\\endpoint.py", line 116, in consume\n self._handle_request(message[\'id\'], message[\'method\'], message.get(\'params\'))\n', '
Troubleshooting this further, I certainly have read/write/modify access to the following levels of this path:
\\data-dist\DataVol_014\group\users\myusername\myscript.py
\\data-dist\DataVol_014\group\users\myusername\
\\data-dist\DataVol_014\group\users\
However, I cannot even view this level:
\\data-dist\DataVol_014\group\
Still this does not make sense to me. I don't understand why spyder would need this level of access.
Any help/guidance is appreciated.
The error certainly goes away if I copy the script to a local drive on said server and the black autoformatting works as expected.

Cannot run scripts in Rstudio

I'm working through some exercises in an Introduction to R book (A Dummy's Book to be specific). I am running Rstudio version 1.1.447. I Enter the following script
h <-hello
yourname <-readline("What is your name")
Print(paste(h,yourname))
I then press Ctrl+Shift+S. When I do this, I get the following error message:
Error in file(con, "w") : cannot open the connection
In addition: Warning message:
In file(con, "w") :
cannot open file 'C:/Users/efami/OneDrive/Documents/.active-rstudio-document': Permission denied
I am running RStudio in Administrative Mode in a Windows 10 system. I do not understand where this path is coming from (it's obviously picking up something in my environment) or how to get past this problem.
I still don't know why it picked up the directory shown in the error message but the trick is to override the directory by creating a .Renviron file. The instructions on how to do this are found here:
Change temporary directory

PG Admin III Slony-I creation scripts not available

I have installed PostgreSQL 9.4 (x86), PG Admin 1.20 and Slony-I 2.2.3 through Stack Builder on a windows platform.
When trying to create a new Slony cluster in pgAdmin, I get the
"Slony-I creation scripts not available" error message.
1) I have setup options Slony-I path to
-->:C:\Program Files (x86)\PostgreSQL\9.4\share
where all the slony1_*.sql scripts are located but I still get the same error.
2) Using procmon I see that PGAdmin tries to access "slony1_funcs.sql" and "slony1_funcs.2.2.0.sql" none of which exist in my \share directory
the installed funcs scripts are "slony1_funcs.2.2.3.sql", "slony1_funcs.v83.2.2.3.sql", slony1_funcs.v84.2.2.3.sql
and the base scripts are "slony1_base.2.2.3.sql", "slony1_base.v83.2.2.3.sql", slony1_base.v84.2.2.3.sql
3) I have tried to rename "slony1_funcs.2.2.3.sql" to "slony1_funcs.2.2.0.sql" and "slony1_funcs.sql" and I now get a new error "Couldn't test for the Slony version. Assuming 1.2.0" and again the
"Slony-I creation scripts not available" error message
Does anyone have an idea how to get this working?

Qt 5.3.1: macdeployqt tries to include everything on my hard drive; how to fix?

I'm running Qt 5.3.1 on Mac OS X 10.8 and 10.9 I'm trying to use the macdeployqt tool to bundle libraries and plugins with my executable, but it's apparently trying to include everything on my hard drive.
I invoke it with:
/Applications/Qt/5.3.1/5.3/clang_64/bin/macdeployqt /Users/adamwilt/Desktop/temp/DesktopPixie.app -verbose=2
-qmldir=/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/DesktopPixie
and get lots of normal, expected log messages like:
Log: copy: "/Applications/Qt/5.3.1/5.3/clang_64/qml/QtQuick/Controls/Styles/Base/images" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/QtQuick/Controls/Styles/Base/images"
...and all runs fine until I start getting messages like:
Log: copy: "" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums"
ERROR: file copy failed from "/do-gst"
ERROR: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/do-gst"
ERROR: file copy failed from "/rescuepro.properties"
ERROR: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/rescuepro.properties"
ERROR: file copy failed from "/rescuepro34act.lic"
and then the fun begins:
Log: copy: "/Applications" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications"
Log: copied: "/Applications/License.rtf"
Log: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications/License.rtf"
Log: copy: "/Applications/0xED-1.0.7.app" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications/0xED-1.0.7.app"
It appears it's trying to copy everything (that is, "") into the app, but I ^C out of it while I still have disk space left!
It didn't do this at first; then it did so for a week; then it stopped; now it's back. This is a distributed development project; I'm doing the QML stuff and folks elsewhere are doing the C++. It's possible the other folks are changing a configuration somewhere that's causing this to occur, but I'm the only one doing Mac deployments, so I'm the only one who sees this.
Is there a config file of some sort for macdeployqt where this might be getting triggered? Or is it more likely a problem related to the C++ object MessageBoxUI, which defines several Q_ENUMs (apparently correctly, as it compiles without warnings or errors, and appears to run properly), since that's the target directory when it starts going mad?
Sussed it (well enough that I can go on):
The Qt app I'm trying to deploy lives in ~/Desktop/temp. If I set my current directory to ~/Desktop or ~/Desktop/temp before I run macdeployqt, it runs as expected.
If I run it from from my home directory ~, or ~/Documents, macdeployqt tries to pull in everything it finds in /Applications, /opt, and/or other directories unassociated with the app.
Setting cwd to most other paths, including ~/Downloads, /Applications, subdirectories of ~/Documents, etc. also seems to work; it's only running macdeployqt from ~ and ~/Documents that causes the problem.
No proper explanation as to why this is happening, but just a warning in case someone else sees this sort of weird behavior: try changing to the apps's location before running macdeployqt.

Creating Setup of large data with NSIS Script

I am creating setup of large data approximetly 10 GB with NSIS Script and trying to create a single setup (exe). Its giving an Error -
Internal compiler error #12345: error mmapping file (xxxxxxxxxx, xxxxxxxx) is out of range.
Note: you may have one or two (large) stale temporary file(s) left in your temporary directory (Generally this only happens on Windows 9x).
Please tell me how to solve this issue ?
Is there any other way to create a setup for this kinda situation ?
NSIS installers are limited to 2Gb.
If you absolutely need it to be one file and you want to continue to use NSIS you have to append the data to the end of the generated setup. I'm not sure I would recommend that approach but it could work if the appended data is a zip file (or some other format with the header at the end) and you use one of the NSIS zip plugins to extract at run-time...
I have used https://sourceforge.net/projects/nsisbi/ instead of normal NSIS. It solved the problem.
I was using Silent Install Builder 5 and received this same error with a package installer that had LESS that 2 GB total. Once I determined that the NSIS compiler was to blame, I began experimenting with several possible solutions and here's what worked: I downloaded the newer NSISBI compiler from here https://sourceforge.net/projects/nsisbi/ and then did these 3 steps:
Go to C:\Program Files (x86)\Silent Install Builder 5 and renamed the default NSIS folder to a new name.
Copied the NSISBI folder into the C:\Program Files (x86)\Silent Install Builder 5 directory and renamed IT to NSIS.
Tries to compile some large packages above and just below 2GB and the first few tries I would get missing file errors in the Silent Install Builder 5 compiling box. No worries because the missing files are in the old NSIS folder, that's why y9u don't delete it.
Each time find the missing file error displays, find the missing files and copy them into the same folder location in the new NSIS folder. About 3 times you will do this until there are no more errors at all and you can then include the large files without generating the "internal compiler error #12345: error mmapping file xxxx is out of range." error message. NSISBI works!

Resources