AWS CodeDeploy ymal file error - amazon-web-services

I am deploying an application using AWS code deploy to Windows environment. I use an apspec.yml yaml file. When I deploy the application I get following error
The deployment failed because an invalid version value () was entered in the application specification file. Make sure your AppSpec file specifies "0.0" as the version, and then try again.
It seems like there is a problem with encoding or line ending. All the materials in the internet are for linux but not for windows. I use visual studio editor to edit this file. How to fix this issue?

In my case the encoding was wrong. appspec.yml should be saved as UTF-8 and not UTF-8 BOM.
BTW: The encoding can be changed in VS 2017 using File > Save as.., then the down arrow at the Save-Button ... Save with encoding...

The issue is in the line ending. If you create a yml file make sure you use \n line ending (linux way of line ending) instead of \r\n (windows way of line ending). If your editor is visual studio when you safe the yml file save it as follows.
File->Advanced Saved Options

Make sure your appspec.yml starts with below line
version: 0.0
codedeploy requires this attribute as must. refer this

Change the Encoding format by simply opening it notepad++ from UTF-8-BOM to UTF-8

Related

C++ : File format error

While compiling c++ code using vs 2005, i'm getting following mac file format related error. I couldn't find any reference in the internet for this particular error. Can someone help me regarding this.
error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
According to the MSDN:
The line termination character of the first line of a source file is Macintosh style (‘\r’) as opposed to UNIX (‘\n’) or DOS (‘\r\n’).
So just change line ending for your file. To do that, go File -> Advanced Save Options -> Set line endings to Windows.

QDesktopServices::openUrl() fails if path contains spaces (after "apt-get upgrade")

I recently saw this error on programs which used to work fine. I think that the error started appearing after I did a sudo apt-get upgrade, which might have upgraded the Qt libraries on my machine.
I've reproduced this error for newly created project containing this code:
QDesktopServices::openUrl(QUrl("/home/sashoalm/Has Spaces.txt"));
QDesktopServices::openUrl(QUrl::fromLocalFile("/home/sashoalm/Has Spaces.txt"));
This produces 2 message boxes saying the same - /home/sashoalm/Has%20Spaces.txt: No such file or directory. But the file exists - I've verified that, xdg-open "/home/sashoalm/Has Spaces.txt" works fine, for example.
Any workarounds? When did this bug happen? My OS is Debian Wheezy.
Edit: I checked Qt4's source code, and the relevant code is this (from qdesktopservices_x11.cpp):
return (QProcess::startDetached(client + QLatin1Char(' ') + QString::fromLatin1(url.toEncoded().constData())));
QUrl::toEncoded() returns the percent-encoded path as file:///home/sashoalm/Has%20Spaces.txt. What is strange is that there were no changes in that file save updating the copyright notices since at before 2011. So it can't be a change in Qt. But the command issued by QDesktopServices::openUrl() is xdg-open file:///home/sashoalm/Has%20Spaces.txt, and that doesn't work on my computer. Perhaps it used to work before, and an update to xdg-open itself broke it? Does anyone know if xdg-open should handle file:/// with percent encoding?
on Qt5
QDesktopServices::openUrl(QUrl::fromLocalFile("/home/sashoalm/Has Spaces.txt"));
worked just fine. I was having the same problem when loading the file purely from a QUrl like the first line
QDesktopServices::openUrl(QUrl("/home/sashoalm/Has Spaces.txt"));
but when used the QUrl::fromLocalFile it just did the thing
Either escape the space with \
QUrl("/home/sashoalm/Has\ Spaces.txt")
or add quotes to the path: -
QUrl("\"/home/sashoalm/Has Spaces\"")

How could I remove "error C4335: Mac file format detected" in VC 2008

I am now compiling a project with VC++ 2008, and the error I have obtained is as follows:
Error 7 error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
I was wondering how I could solve this kind of errors. I have found this link useful but the solution is suitable for VC++ 2010 rather than VC++ 2008. Any suggestion will be appreciated.
For VS2012 select and open the file within solution explorer. File->Advanced Save Options-> Set Encoding: Western European (Windows) && Set Line endings: Unix
You can use this addon to make the conversions automatically across your project, it's extremely easy.
Just save it in the format you want; VC+ 2008: http://msdn.microsoft.com/en-us/library/aad7fash(v=vs.90).aspx
You can open your file with Sublime Text, then open "View"->"Line Endings"->Unix/Windows. Then save the file.
Mac formatted files contain \r at the end of each line and that can cause in some cases compilation errors. Just remove the \r in each end of line and only use '\n' and try again. This warning should be then gone.
See also https://www.oreilly.com/library/view/mac-os-x/0596004605/ch01s06.html

xtk-deps.js file missing?

I am ref to https://github.com/xtk/X/wiki/X:DevelopersHeadsUp
I tried Running XTK during development.
I did the following steps
1) Fork XTK on Github to get the latest sources http://github.com/XTK/X
2) Clone it to your hard drive
But i couldn't find the xtk-deps.js file in the folder.
When i try
./build.py -d
Its complaining that "The command line is too long" and not generating xtk-deps.js file. Can some one help me where i went wrong ?
Yep, the error comes from the python script builds via a shell command line which is too long for the Windows prompt. The best is using Linux or Mac, or we can give you one and then you'll have to edit it manualy when you add/remove classes but it's not the easiest !

invalid UTF-8 data

I am facing a issue of invalid UTF-8 data in my application.
Actually whenever i opens my application for editing purpose i get the following error:
[Macromedia][Oracle JDBC Driver]Transliteration failed, reason: invalid UTF8 data
Some editors expect your code file to be saved in plain UTF8. An easy way to fix it is to open up the affected code file in Notepad, and then re-save it using Notepad's default encoding. Then you can open it in your favorite editor. See if that works.
Excerpt from Nodans
The DataDirect Oracle Driver that ships with ColdFusion 9 has an error in it. It appears the error is fixed and if you have an agreement with the provider, you can download an update. However, I don't have an agreement so I downloaded fresh Oracle JDBC Drivers to fix the problem. Here's what I did:
Download the drivers here: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
For Details: http://www.nodans.com/index.cfm/2012/6/6/How-to-solve-error-Oracle-JDBC-DriverTransliteration-failed-reason-invalid-UTF8-data