error Command failed with exit code 1. in compile protobufjs - protobufjs

I update protobufjs from 6.11.2 to 7.1.2 then when I run my compiler to compile my protobufs I got this error
Usage: pbjs [options] <schema_path>
Options:
-V, --version output the version number
--es5 <js_path> Generate ES5 JavaScript code
--es6 <js_path> Generate ES6 JavaScript code
--ts <ts_path> Generate TypeScript code
--decode <msg_type> Decode standard input to JSON
--encode <msg_type> Encode standard input to JSON
-h, --help output usage information
error Command failed with exit code 1.
What shall I do ?

I resolved this by adding protobufjs-cli.
yarn add protobufjs-cli

Related

ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)

If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
+ GAE=/platform/google_appengine
make: *** [local_service_config]
I'm getting this & don't know what to do... I just want to use the sdk ,I have tried to reinstall gcloud sdk and added the configuration in ~/.zshrc file but still getting this error. Also tried to run after adding these in ~/.zshrc file
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
Note: M1 Mac User

Change syntax of -k option in pytest 7.1.0 is not working with pytest_addoption(parser)

Below is my code which was working perfectly fine till I upgraded pytest to version 7.1.0
pytest.main(self.pytest_args + ["-k", tc_cfg.name, "--aq-cfg", tc_cfg.aq_cfg])
and in conftest, I have below code:
def pytest_addoption(parser):
parser.addoption("--aq-cfg", required=False)
This was working fine for earlier pytest versions. With latest one(pytest 7.1.0) its failing with below error:
ERROR: usage: aqueduct [options] [file_or_dir] [file_or_dir] [...]
aqueduct: error: unrecognized arguments: --aq-cfg all_envs
inifile: /home/aquser/dev/aqueduct/src/cb/test/tools/aqueduct/pytest.ini
rootdir: /home/aquser/dev/aqueduct/src/cb/test/tools/aqueduct
This is occurring because latest change added for -k syntax: https://docs.pytest.org/en/stable/changelog.html#pytest-7-1-0-2022-03-13
But if I try to remove --aq-cfg, its failing at pytest_adoption(parsar) and not able to locate file without "--".
Any help on this would be appreciated!

VS Code and pytest: Where is the default junit-xml output path defined and why is there one?

I am trying to run a debug the tests of my Python project inside the VS Code interface.
I followed the instruction from VS Code's website using pytest but when trying to run a test the output fails:
============================= test session starts =============================
platform win32 -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: c:\Users\myUserName\Projects\myProjectName
plugins: localserver-0.5.0
collected 1 item
myProjectName\tests\test_static_analysis.py . [100%]
- generated xml file: C:\Users\MYUSERNAME\AppData\Local\Temp\tmp-26696NTXW7ChqfMEN.xml
-
============================== 1 passed in 0.18s ==============================
Error: Error: cannot open file:///c%3A/Users/myUserName/Projects/myProjectName/C. Detail:
Unable to read file 'c:\Users\myUserName\Projects\myProjectName\C' (Error: Unable to resolve
non-existing file 'c:\Users\myUserName\Projects\myProjectName\C')
Error: Error: cannot open file:///c%3A/Users/myUserName/Projects/myProjectName/C. Detail:
Unable to read file 'c:\Users\myUserName\Projects\myProjectName\C' (Error: Unable to resolve
non-existing file 'c:\Users\myUserName\Projects\myProjectName\C')
Maybe VS Code doesn't have the authorization to write in AppData.
What concerns me is why is VS Code launching pytest with a junit-xml output option?
The command actually executed by VS Code is:
c:; cd 'c:\Users\myUserName\Projects\myProjectName'; & 'C:\ProgramData\Anaconda3\envs\venv-myProjectName\python.exe' 'c:\Users\myUserName\.vscode\extensions\ms-python.python-2021.8.1105858891\pythonFiles\lib\python\debugpy\launcher' '53774' '--' 'c:\Users\myUserName\.vscode\extensions\ms-python.python-2021.8.1105858891\pythonFiles\testlauncher.py' 'c:\Users\myUserName\Projects\myProjectName' 'pytest' '--override-ini' 'junit_family=xunit1' '--rootdir' 'c:\Users\myUserName\Projects\myProjectName' '--junit-xml=C:\Users\MYUSERNAME\AppData\Local\Temp\tmp-26696pYh1w3pF2cXx.xml' './myProjectName/tests/test_static_analysis.py::TestStaticAnalysisVesselForceOnLateralCenter::test_pos_surge_on_vessel'
When going in Settings > python.testing.pytestArgs it is empty.
Where is this output path defined?
How can I change it to be in the local working directory?
Do I need to have a junit-xml output? Is it mandatory for VS Code UI to work?

Issue with building a haskell-stack postgresql project

I'm trying to use stack to set up the yesod-postgres template project on my Windows machine. Unfortunately, when I run stack build I get the following result:
pg-project-0.0.0: build
Preprocessing library pg-project-0.0.0...
In-place registering pg-project-0.0.0...
Preprocessing executable 'pg-project' for pg-project-0.0.0...
Linking .stack-work\dist\95439361\build\pg-project\pg-project.exe ...
C:/Users/Rik/AppData/Local/Programs/stack/i386-windows/ghc-7.10.3/mingw/bin/ld.exe: cannot find -lpq
collect2.exe: error: ld returned 1 exit status
-- While building package pg-project-0.0.0 using:
C:\stack_root\setup-exe-cache\i386-windows\setup-Simple-Cabal-1.22.5.0-ghc-7.10.3.exe --builddir=.stack-work\dist\95439361 build lib:pg-project exe:pg-project --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
I've added C:\PostgreSQL\bin to my PATH, and I'm using the 32-bit version of PostgreSQL 9.5.
Any help is appreciated.

Why can't MATLAB deploytool output exe file?

deploytool works well until creating exe file using mbuild then get this error:
Executing command: mbuild -O -v -output "U1" -I"e:\Mat2009\work\ntst1\U1\src" "e:\Mat2009\work\ntst1\U1\src\U1_main.c" "e:\Mat2009\work\ntst1\U1\src\U1_delay_load.c" "e:\Mat2009\work\ntst1\U1\src\U1_mcc_component_data.c" -link exe -env MCR_DELAYLOAD=/delayload:mclmcrrt710.dll -env
MCR_DELAYLIB=delayimp.lib -outdir "e:\Mat2009\work\ntst1\U1\src"
Error: An error occurred while shelling out to mbuild (error code = -1).
Unable to build executable.
??? Error using ==> mcc
Error executing mcc, return status = 1 (0x1).
How can I resolve this error?
This error looks similar to an error I encountered once (after upgrading to 2012b), I cannot recall the source but I found two potential solutions:
Make sure there are no spaces in the path to the compiler
Try building a few times and cross your fingers
Given the time frame I had I chose to go for option two and after 5-10 attempts it suprisingly worked.
have found that COMSPEC env. var had a wrong value, so I deleted the wrong path, restarted MATLAB then it worked well.