Closed WysokiStudent closed 3 years ago
Since my locale is polish in line 66 of op.py the variable line is b"make: Wej\xc5\x9bcie do katalogu '/home/zannzetsu/.unikraft/unikraft'\n"
That seems to fail in the next line where decode('ascii') is run.
If i replace 'ascii' with 'utf-8' hello world builds but kraft errors out with
Successfully built unikernels:
To instantiate, use: kraft run
[CRITICAL] Could not find unikernel: /home/zannzetsu/unikraft/./my-first-unikernel/build/helloworld_kvm-x86_64
Indeed there is no such file, the file is named my-first-unikernel_kvm-x86_64
.
Here is the ascii -> utf-8 patch.
diff --git a/plat/network/driver/brctl.py b/plat/network/driver/brctl.py
index 8bb87e1..21f2e89 100644
--- a/plat/network/driver/brctl.py
+++ b/plat/network/driver/brctl.py
@@ -98,7 +98,7 @@ class BRCTLDriver(NetworkDriver):
if err == b"can't get info No such device\n":
return False
- elif "does not exist!" in err.decode('ascii'):
+ elif "does not exist!" in err.decode('utf-8'):
return False
return True
diff --git a/util/op.py b/util/op.py
index 145b296..0bf5a8b 100644
--- a/util/op.py
+++ b/util/op.py
@@ -64,7 +64,7 @@ def execute(cmd="", env={}, dry_run=False, use_logger=False):
)
for line in popen.stdout:
- line = line.strip().decode('ascii')
+ line = line.strip().decode('utf-8')
if use_logger:
logger.info(line)
else:
@@ -140,7 +140,7 @@ def make_progressbar(make=""):
for line in popen.stdout:
t.update()
- line = line.strip().decode('ascii')
+ line = line.strip().decode('utf-8')
if line.startswith("make: Leaving directory") is False and \
line.startswith("make: Entering directory") is False:
print(line)
If I run the kraft like kraft up -t helloworld@staging ./helloworld
then hello world works :) Please update the docs or kraft.
Describe the bug I wanted to try out unikraft but I can't run the hello world example.
kraft up -t helloworld@staging ./my-first-unikernel
results in an errorTo Reproduce Steps to reproduce the behavior:
pip3 install --user git+https://github.com/unikraft/kraft.git@staging
Expected behavior A unikraft hello world image is built
Desktop (please complete the following information):