MouseTrap Status
(→Amber Status) |
(→Amber Status) |
||
Line 150: | Line 150: | ||
+ | |- | ||
|12.11.2012 ||New error is present: | |12.11.2012 ||New error is present: | ||
/usr/lib/python2.7/site-packages/gobject/constants.py:24: | /usr/lib/python2.7/site-packages/gobject/constants.py:24: | ||
Line 189: | Line 190: | ||
+ | |- | ||
|12.17.2012 || Bug for pygobject is here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649861 | |12.17.2012 || Bug for pygobject is here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649861 | ||
The fix is to upgrade to version 3. Changed line in configure.in file to AM_CHECK_PYMOD(cv,,,[AC_MSG_ERROR(Could not find python module cv)]) | The fix is to upgrade to version 3. Changed line in configure.in file to AM_CHECK_PYMOD(cv,,,[AC_MSG_ERROR(Could not find python module cv)]) | ||
Line 228: | Line 230: | ||
+ | |- | ||
|12.19.2012 || | |12.19.2012 || | ||
Revision as of 22:49, 19 December 2012
Please state the versions and OS you are currently working with so that versioning errors can be ruled out.
Team Member Name | Installed packages | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Amber |
| ||||||||||||||||||||||||||
Logan |
|
Please enter the status of the ongoing project below
Contents |
Amber Status
Date | Entry |
---|---|
12.10.2012 | Full install of mousetrap complete. Config file was manipulated to include failed dependency on 'python-opencv' which has been updated and the package is now referred to as 'cv'. Other dependencies are outdated or the names have been changed as well (xlib-python, etc). New errors with 'gobject' have been identified. Here is the recorded error when running mousetrap:
ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',)) ^C[amber@localhost src]$ Traceback (most recent call last) File "<string>", line 1, in <module> File "mousetrap/app/main.py", line 50, in <module> from lib import httpd, dbusd, settings File "mousetrap/app/lib/httpd.py", line 31, in <module> import mouse File "mousetrap/app/lib/mouse.py", line 30, in <module> import pyatspi File "/usr/lib/python2.7/site-packages/pyatspi/__init__.py", line 17, in <module> from gi.repository import Atspi File "/usr/lib/python2.7/site-packages/gi/__init__.py", line 23, in <module> from ._gi import _API, Repository Fix: changed import gobject to from gi.repository import GObject like suggested and changed all instances of gobject to GObject Changed these files: mousetrap/app/main.py mousetrap/app/addons/recalc.py mousetrap/app/addons/cpu.py mousetrap/app/ui/widgets.py mousetrap/ocvfw/dev/camera.py
|
12.11.2012 | New error is present:
/usr/lib/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name(name) == 0' failed import gobject._gobject Traceback (most recent call last): File "<string>", line 1, in <module> File "mousetrap/app/main.py", line 91, in start idm = pocv.get_idm(self.cfg.get("main", "algorithm")) File "mousetrap/ocvfw/pocv.py", line 43, in get_idm []) File "mousetrap/ocvfw/idm/forehead.py", line 32, in <module> from mousetrap.ocvfw.dev.camera import Capture, Point File "mousetrap/ocvfw/dev/camera.py", line 34, in <module> from mousetrap.ocvfw import _ocv as ocv File "mousetrap/ocvfw/_ocv.py", line 282, in <module> class OcvfwPython(OcvfwBase): File "mousetrap/ocvfw/_ocv.py", line 293, in OcvfwPython []) ImportError: No module named opencv.cv /usr/lib/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed import gobject._gobject ^CTraceback (most recent call last): File "<string>", line 1, in <module> File "mousetrap/app/main.py", line 91, in start idm = pocv.get_idm(self.cfg.get("main", "algorithm")) File "mousetrap/ocvfw/pocv.py", line 43, in get_idm []) File "mousetrap/ocvfw/idm/forehead.py", line 32, in <module> from mousetrap.ocvfw.dev.camera import Capture, Point File "mousetrap/ocvfw/dev/camera.py", line 34, in <module> from mousetrap.ocvfw import _ocv as ocv File "mousetrap/ocvfw/_ocv.py", line 282, in <module> class OcvfwPython(OcvfwBase): File "mousetrap/ocvfw/_ocv.py", line 293, in OcvfwPython []) Will attempt to remove instances of broken dependency opencv to the newer cv
|
12.17.2012 | Bug for pygobject is here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649861
The fix is to upgrade to version 3. Changed line in configure.in file to AM_CHECK_PYMOD(cv,,,[AC_MSG_ERROR(Could not find python module cv)]) Highgui no longer exists in the new API for cv (once known as opencv) and it should just be called as cv.whatever. cvCreateCameraCapture() no longer exists, replaced with cv.CaptureFromCAM(). New Error /usr/lib/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed import gobject._gobject DEBUG: mousetrap.ocvfw.idm -> Starting Forehead idm INFO: mousetrap.ocvfw.idm -> Forhead Algorithm loaded DEBUG: mousetrap.ocvfw.idm -> Setting Capture DEBUG: Commons -> New Singleton Add (mousetrap.ocvfw.dev.camera.Camera) VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument DEBUG: ocvfw -> cmStartCamera: Camera Started DEBUG: Camera -> Loaded backend OcvfwPython DEBUG: OcvfwBase -> Changed lk_swap value to True INFO: mousetrap - Idm loaded and started Traceback (most recent call last): File "<string>", line 1, in <module> File "mousetrap/app/main.py", line 101, in start self.itf = MainGui(self) File "mousetrap/app/ui/main.py", line 54, in __init__ self.script = self.ctr.script() File "mousetrap/app/main.py", line 229, in script return get_script_class(self.cfg.get("scripts", "name"))() File "mousetrap/app/ui/scripts/__init__.py", line 45, in get_script_class script = __import__(script_name, globals(), locals()) File "mousetrap/app/ui/scripts/joystick.py", line 36, in <module> from ..widgets import Mapper File "mousetrap/app/ui/widgets.py", line 236, in <module> GObject.type_register(Mapper) TypeError: argument must be a GObject subclass Will look into gtk and GObject for error
|
12.19.2012 |
removed pygtk2 and replaced with gtk3. |
Logan Status
12/15/12
- Was successfully able to fix opencv issue by changing the single line "import opencv" in "configure" to be "import cv".
- When trying to run mousetrap receiving error "ImportError: No module named mousetrap.app.main"
- As Amber had mentioned, must be in the src directory before running the "mousetrap" command. Thank you =]
- >> Fix: Are you in the src directory when you run the command 'mousetrap', for the moustrap.app.main error? (Amber)
- As Amber had mentioned, must be in the src directory before running the "mousetrap" command. Thank you =]
12/16/12
- ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))
- Changed all instances by running
grep -rl 'import gobject' ./ | xargs sed -i 's/import gobject/from gi.repository import GObject/g
- Then changed all instances of gobject to GObject with command
grep -rl 'gobject' ./ | xargs sed -i 's/gobject/GObject/g
12/19/12
- New Error:
/usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed import gobject._gobject [foss2serve@foss2serve src]$ Traceback (most recent call last): File "<string>", line 1, in <module> File "mousetrap/app/main.py", line 91, in start idm = pocv.get_idm(self.cfg.get("main", "algorithm")) File "mousetrap/ocvfw/pocv.py", line 43, in get_idm []) File "mousetrap/ocvfw/idm/forehead.py", line 32, in <module> from mousetrap.ocvfw.dev.camera import Capture, Point File "mousetrap/ocvfw/dev/camera.py", line 34, in <module> from mousetrap.ocvfw import _ocv as ocv File "mousetrap/ocvfw/_ocv.py", line 282, in <module> class OcvfwPython(OcvfwBase): File "mousetrap/ocvfw/_ocv.py", line 298, in OcvfwPython []) ImportError: No module named highgui
- Changed "opencv.highgui" in mousetrap/ocvfw/backends/OcvfwPython.py to "cv"
- Another error:
/usr/lib64/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed import gobject._gobject [foss2serve@foss2serve src]$ DEBUG: mousetrap.ocvfw.idm -> Starting Forehead idm INFO: mousetrap.ocvfw.idm -> Forhead Algorithm loaded DEBUG: mousetrap.ocvfw.idm -> Setting Capture DEBUG: Commons -> New Singleton Add (mousetrap.ocvfw.dev.camera.Camera) Traceback (most recent call last): File "<string>", line 1, in <module> File "mousetrap/app/main.py", line 93, in start self.idm.set_capture(self.cfg.getint("cam", "inputDevIndex")) File "mousetrap/ocvfw/idm/forehead.py", line 108, in set_capture self.cap = Capture(async=True, idx=cam, backend="OcvfwPython") File "mousetrap/ocvfw/dev/camera.py", line 71, in __init__ Camera.start_camera() File "mousetrap/ocvfw/_ocv.py", line 111, in start_camera self.capture = co.hg.cvCreateCameraCapture( int(self.idx) ) AttributeError: 'module' object has no attribute 'cvCreateCameraCapture'
- As Amber mentioned, 'cvCreateCameraCapture' no longer exhists. Replaced the line "self.capture = co.hg.cvCreateCameraCapture( int(self.idx) )" with self.capture = co.hg.CaptureFromCAM( int(self.idx) ) in mousetrap/ocvfw/backends/OcvfwBase.py and mousetrap/ocvfw/_ocv.py.
- Now receiving the same GObject error as Amber:
Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed import gobject._gobject [foss2serve@foss2serve src]$ DEBUG: mousetrap.ocvfw.idm -> Starting Forehead idm INFO: mousetrap.ocvfw.idm -> Forhead Algorithm loaded DEBUG: mousetrap.ocvfw.idm -> Setting Capture DEBUG: Commons -> New Singleton Add (mousetrap.ocvfw.dev.camera.Camera) VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument DEBUG: ocvfw -> cmStartCamera: Camera Started DEBUG: Camera -> Loaded backend OcvfwPython DEBUG: OcvfwBase -> Changed lk_swap value to True INFO: mousetrap - Idm loaded and started Traceback (most recent call last): File "<string>", line 1, in <module> File "mousetrap/app/main.py", line 101, in start self.itf = MainGui(self) File "mousetrap/app/ui/main.py", line 54, in __init__ self.script = self.ctr.script() File "mousetrap/app/main.py", line 229, in script return get_script_class(self.cfg.get("scripts", "name"))() File "mousetrap/app/ui/scripts/__init__.py", line 45, in get_script_class script = __import__(script_name, globals(), locals()) File "mousetrap/app/ui/scripts/joystick.py", line 36, in <module> from ..widgets import Mapper File "mousetrap/app/ui/widgets.py", line 237, in <module> GObject.type_register(Mapper) TypeError: argument must be a GObject subclass