I'm using the python arrow package to format the datetime to german timeformat:
arrow_object = arrow.get(dateobject)
formated_date = arrow_object.format("dddd DD.MM.YYYY", locale="de_DE"))
When running the code with python directly it works as expected. However, after creating an .exe with pyinstaller and executing it, I receive the following error:
arrow.parser.ParserError: Could not parse timezone expression 'Europe/Berlin'.
Is there any way to include the timezone inside the .exe as well?
Related
Upon start up, when I run Rstudio I get the following error message:
"Error: '\U' used without hex digits in character string starting "'C:\U"
This is not an issue when trying to run scripts within Rstudio. However, this error prevents me from running any R script as a local job or outside of RStudio.
I unistalled and reinstalled R 4.0.0 and I am still seeing the same error. When I restart R this is how it appears in the console..
Restarting R session...
Error: '\U' used without hex digits in character string starting "'C:\U"
I do not have any paths in my Rscript or Rprofile. I tried setting my working directory in my Rprofile and it did not remove the error. Any ideas?
I had the same issue and after I deleted .Rprofile and .radian_history from my user directory, the error message disappeared.
I have the API credentials in one separate R script to keep it out of Git. I want to run this script in the beginning of the scripts that actually interact with the different servers. I have successfully used the same strategy for all my global functions.
setwd("G:/script")
source("API_credentials.R") # gives always an error
# > source("API_credentials.R")
# Error: '\s' is an unrecognized escape in character string starting ""g:\s"
source("ProVeg_functions.R") # runs fine
Problem:
Why does the first source() not work, while the second one does? The error message does not make any sense to me.
Solutions tried:
I have tried different escape chars \.
I have tried writing full path & file names.
I have tried putting the file name in as a variable, which gets its
content from a dir() search, to make sure that the file exists and
the name is correctly written.
Order of source() does not change situation.
Isolating the piece of code with error, and restarting R.
upgraded all my packages and R to version 4.0.2.
The API_credentials.r script works fine when run on its own. the Sys.setenv() works fine and I can read the API keys with Sys.getenv().
I am not sure if it is related to my problem, but if I do usethis::edit_r_environ() I can not see my API keys.
Setup
Windows 10, R-Studio 1.3.1093, R version 4.0.2 (2020-06-22)
I mistakenly assumed that the error message was related to the script calling the API_credentials.R, but it actually was an error message indicating an error in the API_credentials.R script. Fixed a typo and all is good.
I am trying to download a set of NetCDF files from: ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/nwm.20180425/medium_range/
When I manually download the files I have no issues connecting, but when I use download.file and attempt to connect I get the following error:
Assertion failed!
Program: C:\Program Files\Rstudio\bin\rsession.exe
File: nc4file.c, Line 2771
Expression: 0
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I have attempted to run the code in R without R studio and got the same result.
My abbreviated code is as followed:
library("ncdf4")
library("ncdf4.helpers")
download.file("ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/nwm.20180425/medium_range/nwm.t00z.medium_range.channel_rt.f006.conus.nc","c:/users/nt/desktop/nwm.t00z.medium_range.channel_rt.f006.conus.nc")
temp = nc_open("c:/users/nt/desktop/nwm.t00z.medium_range.channel_rt.f006.conus.nc")
Adding mode = 'wb' to the download.file arguments solves the issue for me. I've had the same problem when downloading PDFs
download.file("ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/nwm.20180425/medium_range/nwm.t00z.medium_range.channel_rt.f006.conus.nc","C:/teste/teste.nc", mode = 'wb')
I have Used ChoETL.dll and ChoETL.NACHA.dll to read NACHA Formatted file VS2015 C# console and it is working fine.
Created an exe for this console application.
Called the EXE in SSIS package using "Execute Process Task". But it is throwing the below Error.
Message :Failed to parse line to 'ChoETL.NACHA.ChoNACHABatchHeaderRecord' object.
Filename :Sample.txt
StackTrace : at ChoETL.ChoManifoldRecordReader.LoadLine(Tuple`2 pair, Object& rec)
at ChoETL.ChoManifoldRecordReader.<AsEnumerable>d__10.MoveNext()
at ChoETL.ChoManifoldReader.Read()
at ChoETL.NACHA.ChoNACHAReader.<>c__DisplayClass14_0.<GetEnumerator>b__0()
at ChoETL.NACHA.ChoNACHAReader.ChoNACHAEnumeratorWrapper.ChoEnumeratorWrapperInternal`1.MoveNext()
at ChoETL.NACHA.ChoNACHAReader.ChoNACHAEnumeratorWrapper.<BuildEnumerable>d__0`1.MoveNext()
at NachaReader.Program.Main(String[] args
Can any one provide solution to resolve this issue. or suggest any other way to Read NACHA formatted file in SSIS package.
dosen't lsa in r support foreign language
my code
library("lsa")
Loading required package: SnowballC
trm = textmatrix("s/")
the error
[lsa] - could not open file s/s.txt due to encoding problems of the file.
or am doing something wrong
the file which produces error is the source page of amazon
You could try loading the file up in something like Notepad++, then save it as a different encoding. There are also utilities that will convert it, I use one in Git-bash sometimes called iconv. You have to install Git to get access to it.