Unfamiliar error with Machineface CRAMPS SD image

164 views
Skip to first unread message

IonicBasher

unread,
Jul 10, 2016, 6:38:52 PM7/10/16
to Machinekit
Getting this error when trying to run Machineface on latest image both classic machinekit and jessie.

Unsure of what that's about. Axis loads up fine with sample CRAMPS configuration.

Followed this guide as usual:
https://github.com/the-snowwhite/CRAMPS2/wiki/BBB-CRAMPS-Machineface-3D-Printer-Out-Of-The-Box-Experience

Except with:
https://github.com/strahlex/MendelMax-CRAMPS

20160709_005001.jpg
Message has been deleted

IonicBasher

unread,
Jul 11, 2016, 2:11:16 AM7/11/16
to Machinekit

 My apologies. I uploaded the picture on my phone earlier. Here is the text:

machinekit@beaglebone:~$ ~/MendelMax-CRAMPS/run.py
loading cramps2_cape.bbio... cape-universal already loaded
cape-bone-iio already loaded
done
starting configserver... Traceback (most recent call last):
 File "/usr/bin/configserver", line 16, in <module>
   from message_pb2 import Container
ImportError: No module named message_pb2
machinekit@beaglebone:~$

Michael Haberler

unread,
Jul 11, 2016, 3:03:59 AM7/11/16
to IonicBasher, Machinekit
there was an error of this sort recently which I hope should be fixed

please apt update , apt upgrade again


>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.

Bas de Bruijn

unread,
Jul 11, 2016, 3:39:57 AM7/11/16
to machi...@googlegroups.com

Upgrading Machinekit might be your solution

schoo...@btinternet.com

unread,
Jul 11, 2016, 4:12:48 AM7/11/16
to machi...@googlegroups.com

On 11/07/16 08:03, Michael Haberler wrote:

      
Am 11.07.2016 um 07:11 schrieb 'IonicBasher' via Machinekit <machi...@googlegroups.com>:


 My apologies. I uploaded the picture on my phone earlier. Here is the text:

machinekit@beaglebone:~$ ~/MendelMax-CRAMPS/run.py
loading cramps2_cape.bbio... cape-universal already loaded
cape-bone-iio already loaded
done
starting configserver... Traceback (most recent call last):
 File "/usr/bin/configserver", line 16, in <module>
   from message_pb2 import Container
ImportError: No module named message_pb2
machinekit@beaglebone:~$
there was an error of this sort recently which I hope should be fixed

It was fixed by #987 yesterday approx 1600 CET (1500 BST)

It just affected the main machinekit package

The new packages begin with machinekit_0.1.1468151571-1mk.travis.master.git7bcad2ee~1 then the OS / platform

IonicBasher

unread,
Jul 12, 2016, 12:00:09 AM7/12/16
to Machinekit
Hello everyone. 
Thank you for the prompt replies. I apt update and upgraded but the problem persisted. 
The update and upgrade did yield three changes so I thought it would work as in #986.
I am running the latest sd image on the beaglebone black.
I also tried to install the package manually with dpkg -i with the same result.

schoo...@btinternet.com

unread,
Jul 12, 2016, 2:56:10 AM7/12/16
to machi...@googlegroups.com
The error you are getting should not occur if ALL your files were upgraded

However I know nothing about the image you are trying to upgrade and
don't know if all the files are standard.

Look at /bin/configserver

It should have lines the same as these for its imports
https://github.com/machinekit/machinekit/blob/master/src/machinetalk/config-service/configserver.py#L16

Then check for
/usr/lib/python2.7/dist-packages/machinetalk/protobuf/message_pb2

I would think that one of the 2 is missing, it is either importing the
old module path, or the new path does not exist.

regards

schoo...@btinternet.com

unread,
Jul 12, 2016, 5:01:38 AM7/12/16
to machi...@googlegroups.com
I have downloaded the SD image you are using and examined it.

The basic problem is quite simple.

You are using an image for which Machinekit was __compiled__, not
created from packages.

The only package element, aside from support libraries, is
machinekit-xenomai.
(Look at /var/log/apt/history.log to see what packages have been
installed / upgraded from the base OS install)

So best advice, if you want to update your image, wait for Robert Nelson
to release a new SD image.

>> I also tried to install the package manually with dpkg -i with the
same result.

If you force an install of a machinekit package, you are overwriting
binaries etc which cannot be recovered and if you do it incompletely
you may end up with an unstable or non-functioning system, unless you
are very careful what you are doing.

I will await the results of your checks as below

>> Then check for
/usr/lib/python2.7/dist-packages/machinetalk/protobuf/message_pb2

That file should be
/usr/lib/python2.7/dist-packages/machinetalk/protobuf/message_pb2.py

IonicBasher

unread,
Jul 12, 2016, 6:08:24 PM7/12/16
to Machinekit
Ah. The message_pb2.py file exists but the configserver one does not.

Has anyone successfully built machinekit on BBB? Can I manually add the configserver file?

Charles Steinkuehler

unread,
Jul 12, 2016, 6:19:29 PM7/12/16
to machi...@googlegroups.com
On 7/12/2016 5:08 PM, 'IonicBasher' via Machinekit wrote:
>
> Has anyone successfully built machinekit on BBB?

Yes. It's slow and you have to add swap.

Unless you're developing you should just use the packages. If you are
actively developing, a more powerful platform is worth the minimal
investment. If you're just doing minor development, builds are
reasonably quick once you get through the initial build of the whole
repo...just make your tweaks in a RIP install, push them upstream, and
run from packages on your real machine (for easy updates).

--
Charles Steinkuehler
cha...@steinkuehler.net

schoo...@btinternet.com

unread,
Jul 13, 2016, 2:44:39 AM7/13/16
to machi...@googlegroups.com
configserver is python, so it is just a run time interpreted script

You should be able to change the module paths to match the ones I
highlighted in an editor and run it

No need to rebuild

The only other issue is whether anything else in your setup uses those
modules, only way to find out is to run an similarly fix any errors you get.

schoo...@btinternet.com

unread,
Jul 13, 2016, 4:18:52 AM7/13/16
to machi...@googlegroups.com
Just re-read this

configserver DOES exist, it is what threw the error

starting configserver... Traceback (most recent call last):
File "/usr/bin/configserver", line 16, in <module>
from message_pb2 import Container
ImportError: No module named message_pb2


should be in /usr/bin

If it IS missing, it could be you have installed the machinekit package
onto a binary system, then removed it,
thus removing all your old binary files and rendering the system unusable

The answer then, would be to copy your /home dir and anything else to a
USB stick and write a fresh SD image.

Hopefully that is not the case.
>>
>

IonicBasher

unread,
Jul 13, 2016, 8:19:27 PM7/13/16
to Machinekit

Okay. I tried installing by packages on a stock debian image but failed to open even the sample configuration for cramps. Another problem for another time.

I reflashed the latest wheezy image of machinekit to climate possible sources of errors.

I tried running strahlex/MendelMax-CRAMPS/run.py incrementally.

First I got Machineface, Cetus, Mendelmax-CRAMPS then tried the run.py. It showed the correct start text but failed to show up on multiple machine kit client devices.

After apt-get upgrade and update yielded the same result.

After "apt-get install machinekit-dev" the above error occurs.

I verified all files (configserver[line:16], message_pb2) were still there. They were.

The attached picture should show all files and error. I'm confused now.

20160713_185013.jpeg

schoo...@btinternet.com

unread,
Jul 14, 2016, 4:07:15 AM7/14/16
to machi...@googlegroups.com
You are confused!? Please read the title of this thread.

Instead of quoting your original question and then ignoring my advice on
that subject and talking about a completely different subject, please
just try what I suggested.

Your install presumably worked fine until you tried "upgrading" by
overwriting a binary image with packages, so just download the image
again and all should be as before.

If you wish to raise another issue, please do it as described in
http://www.machinekit.io/docs/getting-help

Random screen captures are no use in reproducing any problems

Incidentally, there is a message_pb2.pyc file in your file manager
capture, which shows the message_pb2.py file HAS been found and used.
A pre-compiled version has been created to speed the next access.


IonicBasher .

unread,
Jul 14, 2016, 2:50:19 PM7/14/16
to schoo...@btinternet.com, machi...@googlegroups.com

Like I said I tried the run.py file incrementally on a BRAND NEW image before any updates. Only grabbed the configuration files, machineface and cetus from github into home folder.

The response of the run.py was typically what you should see when running however the instance did not show up on multiple machinekit client devices.

THEN I updated and upgraded with the same typical run.py results with no instances in machine client.

So FINALLY I installed machinekit-dev which is what produces the configserver error. But I suspected it also has necessary files to run Machineface.

The purpose of the screen shot was to show that, after I produced the configserver error(in the terminal on the screenshot), I verified that both the configserver.py(including line:16) and message_pb2.py existed.

Despite the error saying it did not.

Merely trying to help narrow down where it might be coming from.

--- You received this message because you are subscribed to a topic in the Google Groups "Machinekit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/machinekit/jdpypzDCsg4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to machinekit+...@googlegroups.com.

Michael Haberler

unread,
Jul 14, 2016, 5:45:17 PM7/14/16
to IonicBasher, Machinekit
hm, that line 16 does not correspond to the current source for configserver: https://github.com/machinekit/machinekit/blob/master/src/machinetalk/config-service/configserver.py#L16

I just upgraded packages on another arm board - the right configserver script is installed

can you please post the output of "apt-cache policy machinekit"

this right now looks like so:

root@sd2205:/home/machinekit# apt-cache policy machinekit
machinekit:
Installed: 0.1.1468432619-1mk.travis.master.git0766e79c~1jessie
Candidate: 0.1.1468432619-1mk.travis.master.git0766e79c~1jessie
Version table:
*** 0.1.1468432619-1mk.travis.master.git0766e79c~1jessie 0
500 http://deb.machinekit.io/debian/ jessie/main armhf Packages
100 /var/lib/dpkg/status


nb the git sha is there (0766e79c) which corresponds to https://github.com/machinekit/machinekit/commit/0766e79cd9597c7786ea415cfcfd2862ca3e68f5
this means the package is current

I also installed machinekit-dev and configserver is still correct

please log the output of apt update && apt upgrade and pastebin it
> You received this message because you are subscribed to the Google Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.

IonicBasher

unread,
Jul 14, 2016, 7:47:10 PM7/14/16
to Machinekit, mr.so...@yahoo.com
The attached file is the entirety of commands that I ran from a brand new RCN jessie machinekit image for the BBB.


Still got the error by the end, perhaps I am doing something wrong if it is not reproduce-able?

Here are the results of  "apt-cache policy machinekit" :

machinekit@beaglebone:~$ apt-cache policy machinekit

machinekit:

  Installed: 0.1.1468432619-1mk.travis.master.git0766e79c~1jessie

  Candidate: 0.1.1468432619-1mk.travis.master.git0766e79c~1jessie

  Version table:

 *** 0.1.1468432619-1mk.travis.master.git0766e79c~1jessie 0

        500 http://deb.machinekit.io/debian/ jessie/main armhf Packages

        100 /var/lib/dpkg/status

machinekit@beaglebone:~$ 




Thanks for all of the help by the way to all involved.

configserver_error.txt

schoo...@btinternet.com

unread,
Jul 15, 2016, 4:27:40 AM7/15/16
to machi...@googlegroups.com

On 14/07/16 19:50, IonicBasher . wrote:
>
> Like I said I tried the run.py file incrementally on a BRAND NEW image
> before any updates. Only grabbed the configuration files, machineface
> and cetus from github into home folder.
>
Apologies, I read that you had installed Wheezy, as in installing the OS
not a new copy of the RCN image
I expect this is what confused me

>> I tried installing by packages on a stock debian image but failed to
open even the sample configuration for cramps. Another problem for
another time.
>> I reflashed the latest wheezy image of machinekit to climate
possible sources of errors.

There are all sorts of questions which have never been covered

Did the image EVER work?

If so, what changed?

Why did you try to 'upgrade' in the first place, was it because of the
error finding instances?

In which case we might be trying to fix your attempt to fix, not the
actual problem.

In any event, as I said before, trying to 'upgrade' a binary image with
a package is a really bad idea,
because all original files get overwritten and there is no uninstall option.


Michael Haberler

unread,
Jul 15, 2016, 5:10:48 AM7/15/16
to IonicBasher, Machinekit
I got the same error now on another ARM image:


machinekit@sd2205:~$ /usr/bin/configserver
Traceback (most recent call last):
File "/usr/bin/configserver", line 16, in <module>
from machinetalk.protobuf.message_pb2 import Container
ImportError: No module named machinetalk.protobuf.message_pb2

this is due to an __init__.py file missing


try this:

sudo touch /usr/lib/python2.7/dist-packages/machinetalk/__init__.py

and re-run (works for me thereafter)

could you please file a bug in the issue tracker?

- Michael


>
>
>
>
>
>
>
> Thanks for all of the help by the way to all involved.
>
>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.
> <configserver_error.txt>

Michael Haberler

unread,
Jul 15, 2016, 5:44:07 AM7/15/16
to IonicBasher, Machinekit

schoo...@btinternet.com

unread,
Jul 15, 2016, 5:45:23 AM7/15/16
to machi...@googlegroups.com
I don't know what is going on here, but the __init__py file is NOT
missing from the package

mick@INTEL-i7:/downloads$ dpkg -c
machinekit_0.1.1468568321-1mk.travis.master.gitba4be43b~1jessie_amd64.deb |
grep init

-rw-r--r-- root/root 8786 2016-07-15 09:04
./usr/share/linuxcnc/examples/sample-configs/sim/axis/vismach/hexapod-sim/minitetra.ini
-rw-r--r-- root/root 0 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/touchy/__init__.py
-rw-r--r-- root/root 911 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/rs274/__init__.py
-rw-r--r-- root/root 0 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/stepconf/__init__.py
-rw-r--r-- root/root 31 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/gladevcp/__init__.py
-rw-r--r-- root/root 0 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/gscreen/__init__.py

-rw-r--r-- root/root 0 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/machinetalk/protobuf/__init__.py

-rw-r--r-- root/root 0 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/gmoccapy/__init__.py
-rw-r--r-- root/root 2 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/fdm/__init__.py
-rw-r--r-- root/root 0 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/machinekit/__init__.py
-rw-r--r-- root/root 2 2016-07-15 09:20
./usr/lib/python2.7/dist-packages/drivers/__init__.py

Michael Haberler

unread,
Jul 15, 2016, 6:01:37 AM7/15/16
to schoo...@btinternet.com, machi...@googlegroups.com
that file is fine
what is missing is ./usr/lib/python2.7/dist-packages/machinetalk/__init__.py (note lack of protobuf subdir)
this is needed since it's a nested package with 2 levels of nesting
I hope https://github.com/machinekit/machinekit/pull/1000 fixes this, let's see

Michael Haberler

unread,
Jul 15, 2016, 12:00:05 PM7/15/16
to IonicBasher, Machinekit
work on a fix is on progress

until then, this should be sufficient as a workaround:

sudo touch /usr/lib/python2.7/dist-packages/machinetalk/__init__.py

- Michael
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
> ---
> You received this message because you are subscribed to the Google Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.
> <configserver_error.txt>

Michael Haberler

unread,
Jul 15, 2016, 4:15:41 PM7/15/16
to IonicBasher, Machinekit

> Am 15.07.2016 um 18:00 schrieb Michael Haberler <mai...@mah.priv.at>:
>
> work on a fix is on progress

Alex committed a fix - thanks!

this should be in git SHA 2c0bb2a, build still running but should be online in an hour or so

please apt update && apt upgrade then, and verify with apt-cache policy machinekit you got the right git SHA


thanks for the patience!


Alex took on a long-pending and nasty job, a cleanup of the protobuf namespace, in preparing for making the protobuf stuff workable for use outside the machinekit package; and of the many traps lying in this minefield one was not defused

- Michael

IonicBasher

unread,
Jul 15, 2016, 6:36:44 PM7/15/16
to Machinekit, mr.so...@yahoo.com
I updated and upgraded then confirmed the correct git SHA but it did not fix the issue. 

Then I used the workaround you posted: "sudo touch /usr/lib/python2.7/dist-packages/machinetalk/__init__.py " 
which did fix the issue, however I was still unable to find any available instances on the machinekit client app on windows and android using the latest(July 15) downloads.

Michael Haberler

unread,
Jul 15, 2016, 8:09:44 PM7/15/16
to IonicBasher, Machinekit

> Am 16.07.2016 um 00:36 schrieb 'IonicBasher' via Machinekit <machi...@googlegroups.com>:
>
> I updated and upgraded then confirmed the correct git SHA but it did not fix the issue.
>
> Then I used the workaround you posted: "sudo touch /usr/lib/python2.7/dist-packages/machinetalk/__init__.py "
> which did fix the issue, however I was still unable to find any available instances on the machinekit client app on windows and android using the latest(July 15) downloads.

sorry about that - my oversight
I pushed a fix (49cc0e ; it basically does the touch as above so no difference from the workaround - at least I hope, deb packaging is a bit of a black art for me)

I need to defer to Alex on the discovery part though

IonicBasher

unread,
Jul 15, 2016, 11:53:39 PM7/15/16
to Machinekit, mr.so...@yahoo.com
Thanks for all of the efforts in helping me and especially for developing the project. 




Reply all
Reply to author
Forward
0 new messages