Error when deploying chaincode in Fabric test network - go

Environment: Fabric 2.4.2 Ubuntu20.0.4 go19.5
I've just make a directory in the work directory of minifab, and add my main.go with go.mod go.sum copied from the other chaincode sample. Then I install the code with the command "minifab ccup -n contract -l go -v 1.0 ", finally, it reports to me these error
# Run the chaincode install script on cli container ***********
non-zero return code
Error: failed to normalize chaincode path: 'go list' failed with: can't load package: package simple:
main.go:13:1: illegal UTF-8 encoding
main.go:13:2: illegal UTF-8 encoding
main.go:13:5: illegal UTF-8 encoding
main.go:13:6: illegal UTF-8 encoding
main.go:13:7: illegal UTF-8 encoding
main.go:13:8: illegal UTF-8 encoding
main.go:13:9: illegal UTF-8 encoding
main.go:13:10: illegal UTF-8 encoding
main.go:13:11: illegal UTF-8 encoding
main.go:13:12: illegal UTF-8 encoding
main.go:16:25: illegal UTF-8 encoding
main.go:16:26: illegal UTF-8 encoding
main.go:16:27: illegal UTF-8 encoding
main.go:16:28: illegal UTF-8 encoding
main.go:16:29: illegal UTF-8 encoding
main.go:16:33: illegal UTF-8 encoding
main.go:16:34: illegal UTF-8 encoding: exit status 1
Error: failed to read chaincode package at 'contract_go_1.0.tar.gz': open contract_go_1.0.tar.gz: no such file or directory
# STATS *******************************************************
minifab: ok=31 failed=1
How can I exactly install my chaincode? What happened to it?

I have solved the problem.
Because I have used the winscp as a tool to copy main.go go.mod go.sum into the directory, so the encode of the code has changed. As a result, the go cannot be complied.
I just touch the main.go in Xshell linking to my server, then I successs!
minifab: ok=107 failed=0

Related

ERROR: Malformed input or input contains unmappable characters

I am running the sonar scanner for my project with (-Dsonar.sourceEncoding=UTF-8) but I am getting the following error.
INFO: SonarQube Scanner 3.2.0.1227
INFO: SonarQube server 8.9.7
INFO: Default locale: "en_US", source code encoding: "UTF-8"
WARN: SonarScanner will require Java 11 to run, starting in SonarQube 9.x
...
ERROR: Error during SonarQube Scanner execution
ERROR: Malformed input or input contains unmappable characters: src/main/html/images/T??cnica.jpg
The word has a tilde.I have tried to exclude the .jpg files and the folder where this file is located but I still get the same error. Any solution?
Solution:
Inside the Jenkins container run the following commands to change the locale
apt-get update && apt-get install -y locales
sed -i '/es_ES.UTF-8/s/^# //g' /etc/locale.gen
locale-gen
update-locale LC_ALL="es_ES.UTF-8"
For me, adding this to the Dockerfile was enough:
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8

Jekyll: incompatible character encodings: UTF-8 and Windows-874 (Encoding::CompatibilityError)

how can I fix this issue. this error occur when I try to run local server with Jekyll. I expect that this error came from my file name. (when the file name had changed from Thai character to English character, none of the error occur).
So, Are there any way to fix this error without changing the file name?
see the error
see the error

CONNECT ERROR: Package file is invalid magento error

using everst theme and trying to upload megamenu extension and getting this error need help.....
CONNECT ERROR: Package file is invalid
Invalid package name, allowed: [a-zA-Z0-9_-] chars
Invalid version, should be like: x.x.x
Invalid stability
Invalid date, should be YYYY-DD-MM
Invalid channel URL
Empty authors section
Empty package contents section
what all you need to do is paste the extension key in link : http://freegento.com/ddl-magento-extension.php) and you can download the extension files. Than copy the extension files to root of the site
note : Take backup of files and database before doing any major changes

SingularityGS Invalid US-ASCII character "\xC2")

I am working on Omega 4 Theme in Drupal 7, which uses SingularityGS.
I am trying to run this command "drush omega-guard" and I am getting following error.
error sass/h-mart.no-query.scss (Line 61 of /usr/local/rvm/gems/ruby-1.9.3-p484#omega.h_mart/gems/singularitygs-1.6.2/stylesheets/singularitygs/helpers/_str-replace.scss: Invalid US-ASCII character "\xC2")
error sass/h-mart.styles.scss (Line 61 of /usr/local/rvm/gems/ruby-1.9.3-p484#omega.h_mart/gems/singularitygs-1.6.2/stylesheets/singularitygs/helpers/_str-replace.scss: Invalid US-ASCII character "\xC2")
Compilation failed in 2 files.
This error can be resolved by changing the character encoding to UTF-8 but I am not sure from where I can do that.
I run following code from shell prompt which resolves the issue
export LC_CTYPE="en_US.UTF-8"
Reference link
http://paulchr.ablass.me/blog/schlagworte/encoding/
Check out my answer here. It might help you with the charset problems. https://stackoverflow.com/a/61100643/2828913

apache weird error message encoding

I'm using Windows Command Line and Apache gives me the error in this encoding:
httpd.exe: Syntax error on line 163 of Z:/usr/local/apache/conf/httpd.conf:
ot load Z:/usr/local/php5/php5apache2_2.dll into server: %1 \xed\xe5 \xff\xb\xff\xe5\xf2\xf1\xff \xef\xf0\xe8\xeb\xee\xe6\xe5\xed\xe8\xe5\xec Win32.
I can't find the tool to convert the error message from this \xed\xe5 to UTF-8. What encoding does Apache use?
This Should change it to utf-8.
In httpd.conf add :
AddDefaultCharset utf-8
Make sure you put it at the bottom of the file so that it overrides pre-existing directives.
Hope that helps

Resources