exception while running bitbake - bitbake

taking my first steps in BitBake using this guide, setup works fine until the point when i run bitbake world, where i get this -
WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 41
....
WARNING: python should use 4 spaces indentation, but found tabs in base.bbclass, line 64
Parsing recipes: 100% |###########################################################################################################################################################################| Time: 0:00:00
Parsing of 1 .bb files complete (0 cached, 1 parsed). 1 targets, 0 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: An uncaught exception occurred in runqueue################################################### | ETA: 0:00:00
Traceback (most recent call last):
File "/home/ubuntu/bitbake/lib/bb/runqueue.py", line 1508, in RunQueue.execute_runqueue():
try:
> return self._execute_runqueue()
except bb.runqueue.TaskFailure:
File "/home/ubuntu/bitbake/lib/bb/runqueue.py", line 1428, in RunQueue._execute_runqueue():
[43, 967, 4, 3, 1, 5, 3, 7, 13, 1, 2, 1, 1, 246, 35, 1, 38, 1, 35, 2, 338, 204, 142, 3, 3, 37, 244])
> if self.rqdata.prepare() == 0:
self.state = runQueueComplete
File "/home/ubuntu/bitbake/lib/bb/runqueue.py", line 1164, in RunQueueData.prepare():
todeal.remove(tid)
> self.prepare_task_hash(tid)
File "/home/ubuntu/bitbake/lib/bb/runqueue.py", line 1177, in RunQueueData.prepare_task_hash(tid='/home/ubuntu/Poky/poky/meta-tutorial/recipes-tutorial/first/first_0.1.bb:do_build'):
self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(taskfn, taskname, procdep, self.dataCaches[mc])
> self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(taskfn + "." + taskname)
File "/home/ubuntu/bitbake/lib/bb/siggen.py", line 45, in SignatureGenerator.get_unihash(task='/home/ubuntu/Poky/poky/meta-tutorial/recipes-tutorial/first/first_0.1.bb.do_build'):
def get_unihash(self, task):
> return self.taskhash[task]
KeyError: '/home/ubuntu/Poky/poky/meta-tutorial/recipes-tutorial/first/first_0.1.bb.do_build'
Summary: There were 13 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
and yes - i pulled the latest BitBake from github:
bitbake --version
BitBake Build Tool Core version 1.40.0
what's wrong with my python code?

https://www.yoctoproject.org/docs/2.1/bitbake-user-manual/bitbake-user-manual.html#var-BB_SIGNATURE_HANDLER
It seems using BB_SIGNATURE_HANDLER noop(by default)
I fix this error by adding BB_SIGNATURE_HANDLER define in meta-tutorial/conf/bitbake.conf
BB_SIGNATURE_HANDLER ?= "basichash"

I am facing exactly the same issue, finally found it due to bitbake version.
If you git clone bitbake from https://github.com/openembedded/bitbake, you could checkout to a early version:
git checkout tags/1.26.0 -b 1.26.0
Then the issue is gone.

The tutorial code is broken. The bitbake.conf is stored in
ch04/meta-tutorial/conf/bitbake.conf
but it belongs to
ch04/build/conf/bitbake.conf
Move the file there and it works
I opened an issue: https://bitbucket.org/a4z/bitbakeguide/issues/17/bitbakeconf-stored-in-the-wrong-place

Related

Failing to train Google Colab: Custom Training StyleGan2-ADA

I've been trying to get the following colab notbook to work without success.
I was able to scrape images needed and (hopefully) resized them all to 256x256.
After connecting my drive and following all steps, I reached the training part.
There, I am using the default values with: resume_from = "ffhq256"
The process start but ends after ~20 secods with the following error:
Constructing networks...
Setting up TensorFlow plugin "fused_bias_act.cu": Compiling... Loading... Done.
Setting up TensorFlow plugin "upfirdn_2d.cu": Compiling... Loading... Done.
Resuming from "https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada/pretrained/transfer-learning-source-nets/ffhq-res256-mirror-paper256-noaug.pkl"
Downloading https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada/pretrained/transfer-learning-source-nets/ffhq-res256-mirror-paper256-noaug.pkl ... done
Traceback (most recent call last):
File "train.py", line 645, in <module>
main()
File "train.py", line 637, in main
run_training(**vars(args))
File "train.py", line 522, in run_training
training_loop.training_loop(**training_options)
File "/content/drive/MyDrive/colab-sg2-ada/stylegan2-ada/training/training_loop.py", line 129, in training_loop
G.copy_vars_from(rG)
File "/content/drive/MyDrive/colab-sg2-ada/stylegan2-ada/dnnlib/tflib/network.py", line 512, in copy_vars_from
self._components[name].copy_vars_from(src_comp)
File "/content/drive/MyDrive/colab-sg2-ada/stylegan2-ada/dnnlib/tflib/network.py", line 509, in copy_vars_from
self.copy_own_vars_from(src_net)
File "/content/drive/MyDrive/colab-sg2-ada/stylegan2-ada/dnnlib/tflib/network.py", line 482, in copy_own_vars_from
tfutil.set_vars({self._get_vars()[name]: value for name, value in value_dict.items() if name in self._get_vars()})
File "/content/drive/MyDrive/colab-sg2-ada/stylegan2-ada/dnnlib/tflib/tfutil.py", line 227, in set_vars
run(ops, feed_dict)
File "/content/drive/MyDrive/colab-sg2-ada/stylegan2-ada/dnnlib/tflib/tfutil.py", line 33, in run
return tf.get_default_session().run(*args, **kwargs)
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/client/session.py", line 956, in run
run_metadata_ptr)
File "/tensorflow-1.15.2/python3.7/tensorflow_core/python/client/session.py", line 1156, in _run
(np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (3, 3, 512, 256) for Tensor 'G_synthesis/64x64/Conv0_up/weight/new_value:0', which has shape '(3, 3, 512, 512)'
Any help would be greatly appreciated!

error when starting spyder on ubuntu 22.04

I have just upgrade my ubuntu. I have this error on spyder:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Traceback (most recent call last):
File "/usr/bin/spyder", line 33, in <module>
sys.exit(load_entry_point('spyder==4.2.1', 'gui_scripts', 'spyder')())
File "/usr/lib/python3/dist-packages/spyder/app/start.py", line 213, in main
mainwindow.main(options, args)
File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 3624, in main
mainwindow = create_window(app, splash, options, args)
File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 3482, in create_window
main.setup()
File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 803, in setup
self.completions = CompletionManager(self)
File "/usr/lib/python3/dist-packages/spyder/plugins/completion/plugin.py", line 97, in __init__
plugin_client = Plugin(self.main)
File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/plugin.py", line 50, in __init__
self.installer = KiteInstallerDialog(
File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py", line 287, in __init__
self._integration_widget = KiteIntegrationInfo(self)
File "/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py", line 58, in __init__
image = image.scaled(image_width, image_height, Qt.KeepAspectRatio,
TypeError: arguments did not match any overloaded call:
scaled(self, int, int, aspectRatioMode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio, transformMode: Qt.TransformationMode = Qt.FastTransformation): argument 1 has unexpected type 'float'
scaled(self, QSize, aspectRatioMode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio, transformMode: Qt.TransformationMode = Qt.FastTransformation): argument 1 has unexpected type 'float'
All the solution that I have found deal with specific application developed my different user and not for probel related to upgrade or ubuntu.
As a quick workaround just comment out the lines in File:
/usr/lib/python3/dist-packages/spyder/plugins/completion/kite/widgets/install.py
58
#image = image.scaled(image_width, image_height, Qt.KeepAspectRatio, Qt.SmoothTransformation)
143
#install_gif.setScaledSize(QSize(image_width, image_height))
244-247
#copilot_label.setPixmap(
# copilot_image.scaled(image_width, image_height,
# Qt.KeepAspectRatio,
# Qt.SmoothTransformation))
(Spyder maintainer here) The Spyder package provided by Ubuntu 22.04 (4.2.1, released in December 2020) is broken with the Python version that comes with it (3.10).
However, this error was fixed in any Spyder version released after 5.3.0, released in March 2022. So, to solve this problem please uninstall the Spyder that comes with Ubuntu and install it with pip in a virtualenv, as explained in our documentation.
I had the exact same problem, did a search with the following two items :
"spyder" + "mainwindow.py, line 3624" # aka a piece of the error message
I found the bug report #16571 on spyder's github : "TypeError in Tour with Python 3.10", which identified python 3.10 as the culprit.
In Debian + aptitude I downgraded python 3 from 3.10 to the 3.9 version, launched Spyder again and...problem solved !

How to configure minigui with qvfb?

I just came across an issue with running minigui example.
I download qt-4.8.6 and install correctly on my Ubunut 14.04.
I can run qvfb without any problems, but when I want to run housekeeper (an example from minigui) something wrong happen:
start-qvfb :/opt/Qt-x11-4.8.6/bin/qvfb pcxvfb 3351 XVFB-for-MiniGUI-3.0-(Gtk-Version) 800x600-16bpp
Unknown parameter 3351
Usage: pcxvfb [-width width] [-height height] [-depth depth] [-zoom zoom][-mmap] [-nocursor] [-qwsdisplay :id] [-x11display :id] [-skin skindirectory]
Supported depths: 1, 4, 8, 12, 15, 16, 18, 24, 32
NEWGAL>PCXVFB: Wait too long for CLIENT.
NEWGAL: Does not find matched engine: pc_xvfb.
KERNEL>InitGUI: Can not get graphics engine information!
What should I do?
I just solved this annoying problem by using gvfb instead of qvfb,I download the gvfb v1.0 from http://www.minigui.org/en/download/.
Then:
tar -xzvf gvfb-1.0.0.tar.gz
cd gvfb-1.0.0
cmake .
In this step,you may come across :
Linking C executable gvfb
/usr/bin/ld: CMakeFiles/gvfb.dir/gvfb_linux.o: undefined reference to symbol 'XkbGetIndicatorState'
//usr/lib/i386-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/gvfb] 错误 1
make[1]: *** [src/CMakeFiles/gvfb.dir/all] 错误 2
make: *** [all] 错误 2
To solve this error:
you need to add -lX11 -L/usr/lib/i386-linux-gnu/libXtst.a -L/usr/lib/i386-linux-gnu/libX11.a to gvfb-1.0.0/src/CMakeFiles/gvfb.dir/link.txt (Assume your host are 32-bit.)
then you can run make and make install.
You can run an example offered by minigui to test whether you have installed successfully or not !!!

Unix.error 31 write when using Functory module

I am using the functory module and I am facing a very bizarre issue with the code.
My code is working fine and I have been able to parallelized a play on my game but when I try to play once again (launch another time a parallelized function) it raises a really weird error.
Here you can find the error :
Fatal error: exception Unix.Unix_error(43, "write", "")
Raised by primitive operation at file "unix.ml", line 252, characters 7-34
Called from file "protocol.ml", line 45, characters 10-32
Re-raised at file "network.ml", line 536, characters 10-11
Called from file "network.ml", line 565, characters 47-80
Called from file "list.ml", line 73, characters 12-15
Called from file "network.ml", line 731, characters 4-27
Called from file "map_fold.ml", line 98, characters 4-242
Called from file "game_ia.ml", line 111, characters 10-54
Called from file "gameplay.ml", line 34, characters 12-48
Called from file "gameplay.ml", line 57, characters 22-37
Called from file "gameplay.ml", line 85, characters 5-22
So I've decided to search in the following folders to see what primitive operation has been raised :
(unix.ml) external rename : string -> string -> unit = "unix_rename"
(network.ml) Some jid when w.state <> Disconnected -> send w (Protocol.Master.Kill jid)
So for some reason, it seems that my worker disconnects by itself. I was wondering if any of you already had this issue and what to do in order to solve it ?
You can find my game here. The main files involved are game_ia.ml (best_move_parallelized) and gameplay.ml (at the very bottom).
Thank you in advance for your help.
The error you get is (type the following in the toploop)¹:
# (Obj.magic 43: Unix.error);;
- : Unix.error = Unix.EPROTOTYPE
which means: Protocol wrong type for socket. So you have to examine how you initialize your socket.
¹ You can also count the exceptions in unix.mli, knowing that the first one, E2BIG, is 0. Emacs C-u 43 ↓ helps.

Unexpected error reading GML graph

I have downloaded the gml file which contains the dolphins social network.
Some time ago I did some analysis on that network running python 3.4 and networkx 1.9 on a a Windows7 machine, but now I am running on a Arch linux machine (with the same version of python but with networkx 1.10) and found an issue when tried to read the file.
This is the code used to read the file:
import networkx as nx
nx.read_gml("dolphins.gml")
And this is the stack trace of the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 2, in read_gml
File "/usr/lib/python3.4/site-packages/networkx/utils/decorators.py",line 220, in _open_file
result = func(*new_args, **kwargs)
File "/usr/lib/python3.4/site-packages/networkx/readwrite/gml.py", line 210, in read_gml
G = parse_gml_lines(filter_lines(path), label, destringizer)
File "/usr/lib/python3.4/site-packages/networkx/readwrite/gml.py", line 383, in parse_gml_lines
graph = parse_graph()
File "/usr/lib/python3.4/site-packages/networkx/readwrite/gml.py", line 372, in parse_graph
curr_token, dct = parse_kv(next(tokens))
File "/usr/lib/python3.4/site-packages/networkx/readwrite/gml.py", line 323, in tokenize
(line[pos:], lineno + 1, pos + 1))
networkx.exception.NetworkXError: cannot tokenize 'graph' at (1, 1)
Are you able to read the file? Someone has experienced a simmilar issue? or knows what is generating the error?
Thank you in advance!
In the newer versions of networkx, the gml file should follow a more specific format. The problem with the dolphins.gml is that there should not be any carriage return before the open square brackets. For example:
Wrong format:
graph
[
directed 0
node
[
id 0
label "Beak"
]
.
.
.
Correct format:
graph [
directed 0
node [
id 0
label "Beak"
]
.
.
.
It does not care about how many spaces there are before the square bracket as long as there is more than one and there is no carriage return.
What I ended up doing was using regular expression to get rid of the white spaces before the opening square brackets. The following regex worked for me:
\s+\[
and just replace it with " [". There has to be at least one space before the bracket.
Also keep in mind that every node has to have a unique label.
Hope it helped.
It worked by downgrading the networkx version from 1.10 to 1.9.1.
Hope this answer can help someone else.

Resources