Error with both blogdown:new_site() and New Project > website using blogdown - blogdown

I am following "blogdown: Creating Websites with R Markdown" and unfortunately am stuck in Section 1.2. I created a new project in an empty folder, but get this error:
blogdown::new_site()
'C:\Users\rose89\AppData\Roaming\Hugo\hugo.exe" new site ".' is not recognized as an internal or external command, operable program or batch file.
Error in shell(cmd, mustWork = TRUE, intern = intern) :
'"C:\Users\rose89\AppData\Roaming\Hugo\hugo.exe" new site "." --force -f toml' execution failed with error code 1
I have tried removing and re-installing blogdown. When I try File > New Project > New Directory > website using blogdown, I get a popup error: R code execution error
I am using Windows, R studio 1.3.959 and R version 4.0.2. Here is some other info:
getwd()
1 "C:/Users/rose89/Documents/anothernewproject"
list.files('content', '.md$', full.names = TRUE, recursive = TRUE)
character(0)
I prefer to use the first approach in the console, but feel hopeless as I can't even get the "point and click" approach to work. If anyone has suggestions, I would greatly appreciate them! Thank you. Also this is my first post on StackOverflow and first time trying Blogdown, apologies if my question is not phrased clearly!
Update: I believe the error is due to my domain's "group policy" blocking hugo.exe (and other zipped .exe programs) on my Windows machine. I am working with my department's IT department to find a work-around.

Related

Shopware 6.4.17.2 update results in maintenance mode

After upgrading in the backend by clicking on update button, I'm getting "Our website is currently undergoing maintenance." both on front- and backend. Deleted update-assets folder, nothing changed. When I go to mydomain/recovery/update/index.php I'm getting:
Slim Application Error
The application could not run because of the following error:
Details
Type: TypeError
Message: trim() expects parameter 1 to be string, bool given
File: .../shop/vendor/shopware/recovery/Update/src/DependencyInjection/Container.php
Line: 41
What can I do?
Delete {shopwareRoot}/files/backup/auto_update/dummy.
Then either retry the web updater or better try and update through shell which is recommended and more reliable.
I finally gave up and installed the shop new.
I had exactly the same problem and i found an evil solution: Simply change line 41 in File: .../shop/vendor/shopware/recovery/Update/src/DependencyInjection/Container.php
from
$version = trim(file_get_contents(UPDATE_ASSET_PATH . \DIRECTORY_SEPARATOR . 'version'));
to
$version = "6.4.18.0";
or whatever version you need.
Hope it helps

LicenseService.cs not found

I have a purchased license to use ImageResizer.Sqlreader, I have it working on one section of my site already, and now I'm trying to get it working on a separate section of our site. On my AddImage page (on localhost), the debugger is barfing on a line of code that says:
ImageBuilder.Current.Build(file, ms, resizeCropSettings)
It throws me to an error that says "Source Not Found" and "LicenseService.cs not found". "You need to find LicenseService.cs to view the source for the current call stack frame."
I have the same ImageResizer NuGet packages installed in this project as I do in my already working project:
ImageResizer v4.0.5
ImageResizer.WebConfig v4.0.5
ImageResizer.Storage v4.0.5
ImageResizer.Sqlreader v4.0.5
Gist of diagnostics page
Usage context
Dim resizeCropSettings As New ResizeSettings("maxwidth=1600&maxheight=1600&format=jpg&autorotate=true")
Using ms As New MemoryStream()
' Resize the image
ImageBuilder.Current.Build(file, ms, resizeCropSettings) ' *** Fails to step through here
bytData = ms.ToArray()
End Using
Can you please advise? Thanks in advance.
The ImageResizer code in this question was working properly. The problem was due to an error in my code to save the Image item to the database (type mismatch). Setting the breakpoint as Nathanael suggested allowed me to debug past the "LicenseService.cs not found" error.

Prestashop admin panel is lost after trying to export language packet

There were some language problems in my site which uses a specific theme so I thought,I should pick out the language pack edit and reload it. Because I couldn't find a way to edit it using browser on admin panel.
I just pressed a button named export language packet. I don't know if something happened that time. But it didn't give me a file (an exported file I mean) . So I didn't do anything else. But since that time I can't reach my admin panel. While I write the URL it shows me a big white screen.
On the other side the site itself (not admin panel) is reachable. What can I do to fix my problem?
Hi,
This is the error
( ! ) SCREAM: Error suppression ignored for
( ! ) Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in C:\wamp\www\httpdocs\translations\tr\admin.php on line 586
Call Stack
# Time Memory Function Location
1 0.0009 690552 {main}( ) ..\index.php:0
2 1.7995 9942280 DispatcherCore->dispatch( ) ..\index.php:50
3 2.0567 10375504 ControllerCore::getController( ) ..\Dispatcher.php:342
4 2.0686 12512728 AdminControllerCore->__construct( ) ..\Controller.php:128
5 2.0689 12514200 AdminControllerCore->l( ) ..\AdminController.php:304
6 2.0711 12612344 TranslateCore::getAdminTranslation( ) ..\AdminController.php:1737
The error you got is in your translation file in file translations\tr\admin.php on line number 586.
To fix that error, take a backup of that file, i.e. keep a copy of that file in some other place, then try to find out the syntax error you got there. It is some kind of PHP syntax error there in that translation file. As the translation file is only for the admin section, therefore your site front end may be fine and your site admin section is not working.
If you are not able to find that error and fix it, then delete all contents from that file, and then try to load the admin section.
You should use a translation pack which is provided by prestashop, ie download it from the prestashop http://www.prestashop.com/en/translations .
Also if you want to edit translations, use admin. In your question you mentioned, that you were not able to edit translations, please do provide details for that problem, and also try to edit translations while keeping error reporting on, so if there is any problem, you will get the errors printed. If you got errors printed, then update your question with that error message.
Let me know if you still got any questions.

extra-paths not added to python path with zc.recipe.testrunner

I am trying to run tests by adding a version of tornado downloaded from github.com in the sys.path.
[tests]
recipe = zc.recipe.testrunner
extra-paths = ${buildout:directory}/parts/tornado/
defaults = ['--auto-color', '--auto-progress', '-v']
But when I run bin/tests I get the following error :
ImportError: No module named tornado
Am I not understanding how to use extra-paths ?
Martin
Have you tried looking into generated bin/tests script if it contains your path? It will tell definitely if your buildout.cfg is correct or not. Maybe problem is elsewhere. Because it seem that your code is ok.
If you happen to regularly include various branches from git/mercurial or elsewhere to buildout, you might be interested in mr.developer. mr.developer can download and add package to develop =. You wont need to set extra-path in every section.

"The directory name is invalid" error on Process.Start?

I am writing a launcher program, and when I go to start the process I get the "The directory name is invalid" error. Here is the code that is launching the process:
Const DEBUG_ROOT = _
"Z:\Kiosk_JC\KioskSignIn.root\KioskSignIn\KioskSignIn\KioskSignIn\bin\Debug"
Dim oKiosk As New System.Diagnostics.Process
oKiosk.StartInfo.UserName = oEnc.Decrypt(Username)
oKiosk.StartInfo.Password = oEnc.DecryptSecure(Password)
oKiosk.StartInfo.Domain = oEnc.Decrypt(Domain)
''// The AddBS function appends a '\' to the passed string if it is not present
oKiosk.StartInfo.WorkingDirectory = AddBS(DEBUG_ROOT)
oKiosk.StartInfo.FileName = "KioskSignIn.exe"
oKiosk.StartInfo.UseShellExecute = False
Dim proc As Process = Nothing
proc = System.Diagnostics.Process.Start(oKiosk.StartInfo)
I saw on another question here that I needed to set the WorkingDirectory (before I started searching I was getting the error). Even though I have this property set, I am still getting the error. Any thoughts?
More info
I should also note that my Z:\ is a on my network. I have a function that resolves a path to UNC. When I ran this function on DEBUG_ROOT, I get the same error.
I tried moving the application to c:\kiosk. Same result. I am logged in as the user I am impersonating, so I have access to all shares and files.
Here is the link, for some reason the URL formating wants to consume all the text after the link is designated:
Referred Post
Mapped drives are per-user. You are likely starting the process with a different user.
Sounds like the process can't see the Z: drive or doesn't have security access. What user context does the app run under? Perhaps the Z: drive is not available in that context.
I got the same error as you do. most likely the user you use to run the process does not have access to specified resource (exe file)
try to move your exe to some other location and/or give your user access rights to the file.