Beautyfier error
-
Hi,
I am running a Qt Creator 4.7.0 (MSVC 2015 32 bit) on a 64 bit Windows 10 Home (Version 1803). I tried to enable Artistic Style Beautifier. It appears in the menu but when I run it I get the following error message in General Messages:
No winrtrunner.exe found.
Error in Beautifier: Failed to format: The command “C:\AStyle\bin\AStyle.exe” terminated with exit code 1..
How can I solve this problem? Is it related to the fact, that I am running a 32 bit version on a 64 bit OS?
Thank you for your help.
-
Hi
Did you give it a config/format file to work with ?
(in Tools -> Options )
-
@gabor53
maybe the format file have errors.
try using Astyle from command prompt with your file and see -
and your .astylerc in the project folder is also there?
Im asking as mostly seen this error when config cannot be found or parsed. -
and your .astylerc in the project folder is also there?
Im asking as mostly seen this error when config cannot be found or parsed. -
@gabor53
But your settings say it should look for one in the project folder.Please check
"Use customized style"so it will use that one.
(since you did not add a config file to the project folder, it sounds like)@mrjj
Here is what I have now:
The customized style includes the following:
--indent-classes
--style=java / --style=attach / -A2
-s4 --indent=spaces=4
--attach-namespaces / -xn
--attach-classes / -xc
--attach-inlines / -xl
--attach-closing-while / -xV
--indent-classes / -C
--indent-switches / -S
--indent-cases / -K
--indent-namespaces / -N
--indent-after-parens / -xU
--indent-continuation=# / -xt#
--indent-labels / -L
--indent-preproc-block / -xW
--indent-col1-comments / -Y
--min-conditional-indent=# / -m#
--break-blocks=all / -F
--pad-oper / -p
--pad-comma / -xg
--pad-paren / -P
--delete-empty-lines / -xe
--align-pointer=type / -k1
--align-pointer=middle / -k2
--align-pointer=name / -k3
--align-reference=none / -W0
--align-reference=type / -W1
--align-reference=middle / -W2
--align-reference=name / -W3
--break-closing-braces / -y
--break-elseifs / -e
--break-one-line-headers / -xb
--add-braces / -j
--add-one-line-braces / -J
--break-return-type / -xB
--break-return-type-decl / -xD
--close-templates / -xy
--remove-comment-prefix / -xpThere is no error message just not doing anything.
Thank you for your help.
-
Hi
make sure you run it on a CPP/H file. not QML.
It wont format QML as far as i know. -
Hi @mrjj ,
When I try to run it on a cpp/h file I get the following error message:
Error in Beautifier: Failed to format: The command "C:\AStyle\bin\AStyle.exe" terminated with exit code 1..Is there any beautifyer to format QML?
Thank you.Hi
Not sure what it means by that.
Please try this config. and see.--style=kr --indent=spaces=4 --align-pointer=name --align-reference=name --convert-tabs --attach-namespaces --max-code-length=100 --max-instatement-indent=120 --pad-header --pad-oper
I have not seen any external formatters for QML but I think the build in works pretty ok ?
-
Hi
Not sure what it means by that.
Please try this config. and see.--style=kr --indent=spaces=4 --align-pointer=name --align-reference=name --convert-tabs --attach-namespaces --max-code-length=100 --max-instatement-indent=120 --pad-header --pad-oper
I have not seen any external formatters for QML but I think the build in works pretty ok ?
@mrjj
The built in QML formatter works great.
I entered the codes you recommended into Options - Beautifier - Artistic Style - Options - Use customized style - edit, but got the same error message
Error in Beautifier: Failed to format: The command "C:\AStyle\bin\AStyle.exe" terminated with exit code 1.. -
@mrjj
The built in QML formatter works great.
I entered the codes you recommended into Options - Beautifier - Artistic Style - Options - Use customized style - edit, but got the same error message
Error in Beautifier: Failed to format: The command "C:\AStyle\bin\AStyle.exe" terminated with exit code 1..Hi
Ok, that is a bit odd.If you open a command prompt and type (past)
C:\AStyle\bin\AStyle.exe
it does run the tool and it lists its options ? -
Hi
Ok, that is a bit odd.If you open a command prompt and type (past)
C:\AStyle\bin\AStyle.exe
it does run the tool and it lists its options ?Hi @mrjj ,
The command generated the error message below:
C:\AStyle\bin\Atyle.exe : The term 'C:\AStyle\bin\Atyle.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1- C:\AStyle\bin\Atyle.exe
-
+ CategoryInfo : ObjectNotFound: (C:\AStyle\bin\Atyle.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Thank you for your help.
-
Hi @mrjj ,
The command generated the error message below:
C:\AStyle\bin\Atyle.exe : The term 'C:\AStyle\bin\Atyle.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1- C:\AStyle\bin\Atyle.exe
-
+ CategoryInfo : ObjectNotFound: (C:\AStyle\bin\Atyle.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Thank you for your help.