Cannot run Pupil_Capture in Ubuntu 12, both binary and from src

263 views
Skip to first unread message

chihiro suga

unread,
Oct 7, 2014, 9:03:22 PM10/7/14
to pupil-...@googlegroups.com
Hello,

I've been using Pupil_Capture binary on OS X and it was fine. But now I am trying to use it on my Ubuntu 12 and I came across problems... and I really got stuck.


(1) When I try to run the binary (v0.3.9), 90% of the time, it fails returning those error:

libv4l2: error dequeuing buf: No such device
E Y E Process [WARNING] uvc_capture.linux_video.v4l2_capture : Failed to retrieve frame from /dev/video2 , Retrying
libv4l2: error dequeuing buf: No such device
E Y E Process [WARNING] uvc_capture.linux_video.v4l2_capture : Failed to retrieve frame from /dev/video2 , Retrying
libv4l2: error dequeuing buf: No such device
E Y E Process [WARNING] uvc_capture.linux_video.v4l2_capture : Failed to retrieve frame from /dev/video2 , Retrying
libv4l2: error turning off stream: No such device
E Y E Process [ERROR] uvc_capture.linux_video.v4l2_capture : Device not found. Could not stop it.
E Y E Process [ERROR] eye : Capture from Camera Failed. Stopping.


The strange thing is that once in a while (I would say 10% of all trials), it works with no problem. Also, even when it fails, actually it works fine for around the first 10 seconds (then crashes.)
I have tried the bandwidth trick and rebooted the app and OS many times but I couldn’t solve this problem...
https://github.com/pupil-labs/pupil/wiki/Linux-UVC-Bandwidth


(2) Since I couldn't resolve (1), I decided to compile from source.
I downloaded the source, installed the dependences following this link:  https://github.com/pupil-labs/pupil/wiki/Dependencies-Installation-Linux-12.xx
And when I ran "python pupil_src/capture/main.py", it gets stuck with those errors:

Traceback (most recent call last):
  File "main.py", line 80, in <module>
    from eye import eye
  File "/home/chihiro/pupil/pupil_src/capture/eye.py", line 19, in <module>
    from gl_utils import basic_gl_setup,adjust_gl_view, clear_gl_screen, draw_gl_point_norm,make_coord_system_pixel_based,make_coord_system_norm_based,create_named_texture,draw_named_texture,draw_gl_polyline
  File "/home/chihiro/pupil/pupil_src/shared_modules/gl_utils/__init__.py", line 11, in <module>
    from utils import *
  File "/home/chihiro/pupil/pupil_src/shared_modules/gl_utils/utils.py", line 12, in <module>
    from glfw import glfwGetFramebufferSize,glfwGetWindowSize
ImportError: cannot import name glfwGetFramebufferSize


I quickly checked the module names of my GLFW library and it seems like naming rules in my environment are different... (for example, in my environment, glfwGetFramebufferSize is get_frame_buffer_size)
I thought about manually modifying those but there are so many of them. And I am wondering if there's any way to fix this problem in an efficient way.


(3) Lastly, I tried to run pupil_capture on my mac and receive the data stream from the server running on the Ubuntu 12. The thing I realized is that I am unable to edit the destination of the TCP communication in the UI (it is fixed as tcp:127.0.0.1:5000), thus I'm not able to send the data to some other computer within the network.



Could you give me some advice about fixing those issues? Any feedback is very appreciated.

Thanks,






Moritz Kassner

unread,
Oct 8, 2014, 5:18:00 AM10/8/14
to pupil-...@googlegroups.com
Hi,

1)
the first error I have not seen before. It seems that the eye camera is disconnected from the system. This must either be a hardware issue or some system driver error.  And you will need to investigate this further. What hardware are you running Ubuntu on?

2)
 Running from source will not help you in this case. The problem here must be because you have installed a set of GLFW python bindings yourself. We actually ship our own a set of bindings with the app and use a different convention for naming. Removing your python glfw binding should solve the issue.

3)
I think the way to do this and the way we had done it in the past is to leave the Pupil Server as is and connect with a client to that IP address and port.

I hope this is helpful!

Best,

Moritz



--
You received this message because you are subscribed to the Google Groups "pupil-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pupil-discus...@googlegroups.com.
To post to this group, send email to pupil-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pupil-discuss/cd248ee2-9ec8-4cce-a66c-b787fecf5072%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

chihiro suga

unread,
Oct 9, 2014, 1:37:53 AM10/9/14
to pupil-...@googlegroups.com
Hello Moritz,

Thanks for the reply!

1)
I use Pupil Lab pro.


2)
Oh I see. Do you mean, I followed the pupil lab's tutorial and installed GLFW (== should be correct glfw), however the program is referring to some other GLFW that has previously installed on my ubuntu? Anyway, since it doesn't help my problem I won't try modifying this issue for now...


3) 
I mean, if I want to broadcast the pupil data stream from my mac to my ubuntu, to be integrated on the system on linux, I want the pupil client on my mac to refer Ubuntu's IP. However, the pupil lab's IP is fixed as localhost... (thus it can only communicate with the app on the same computer.)


Thanks,
Chihiro

Moritz Kassner

unread,
Oct 9, 2014, 5:41:13 AM10/9/14
to pupil-...@googlegroups.com
Hi Chihiro,

I was actually curious about the laptop/desktop you where using. 
Are you running Pupil though VM ware? That will be the cause for instable USB connection. I have this happen to me when I try to run cameras on my Ubuntu VM as well.

3) I have never done that so I cannot help you there. But I think you cant sent the server to an IP/Port outside of your machine/os. Your client will need to connect to a remove machine not the other way around. (People with more knowledge on this please correct me.)

M



chihiro suga

unread,
Oct 9, 2014, 2:42:30 PM10/9/14
to pupil-...@googlegroups.com
Hi Moritz,

Thanks for the reply!

No, I'm using Lenovo laptop Ubuntu 12 installed on along with Win8 (dual-booted by rEFInd Boot Manager). So I believe it's pure ubuntu and no VM. 

3) I see, hmm but I think it's feasible to stream data to remote machine over IP if you use UDP... I think that'll be one cool feature. But for now I understand.


Thanks,
Chihiro

chihiro suga

unread,
Oct 29, 2014, 3:34:12 AM10/29/14
to pupil-...@googlegroups.com
Hi,

I've been still working on it, but:

1. I upgraded my OS to Ubuntu 14. But problem remained to be the same.
2. I upgraded numpy. Still pupil capture doesn't work, and now it made pupil player unable to run either... at least pupil player used to work...

Actually pupil player for Mac OS doesn't run on my mac either. It used to work initially, but at some point (maybe I upgraded some python library or something? I don't remember...) it stopped running and crashes right after I open the app with no error message.

If anybody can give me some advice that'll be appreciated, or I will give up using pupil lab for now...

Thanks,
Chihiro

Moritz Kassner

unread,
Oct 29, 2014, 4:52:54 AM10/29/14
to pupil-...@googlegroups.com
Dear Chihiro,

I m sorry to hear that you have these problems. 

Two routes to solve this:

1:
If you had Pupil Capture running on Mac and you want to use streamed data on Ubuntu we should be able to get that to work without having to bother about capture in Ubuntu. Does Pupil Capture work on Mac? Does the Player bundle work?

2: 
Lets get Capture and Player running for you on Ubuntu OS, many users do this and I think this should possible for you as well. Your error could be related the usb device false being suspended. this is how you can disable that: 

in terminal:

sudo modprobe usbcore autosuspend=-1

If Capture still works in Ubuntu you could try that and let me know. If it does not work lets schedule a video meeting to debug.


Best,

Moritz




Moritz Kassner

unread,
Oct 29, 2014, 4:59:59 AM10/29/14
to pupil-...@googlegroups.com
Oh I forgot to mention:

once you do:
sudo modprobe usbcore autosuspend=-1

please reconnect the cameras but dont reboot. This setting is temporary (you can make it permanent if we find that it helps the problem)

Best,

Moritz


chihiro suga

unread,
Oct 29, 2014, 8:21:32 PM10/29/14
to pupil-...@googlegroups.com
Hi Moritz,

Thanks for the email, and apology that I didn't explain enough about what I was trying to do.

I initially wanted to stream the pupil data to some system over network, but after a lot of hustles and fails, I decided not to do it.
Now I changed the strategy, and decided to use:
Use pupil capture on Mac, and use pupil player (to export marker-defined surface information) on whichever platforms that work.
However, I had pupil player on both mac and ubuntu working before, but for some reasons they don't work any more.



- Linux is 14 and I downgraded numpy to 1.7 but I don't still get it working. Can you give the version of numpy you're using?

- Mac is 10.9. Pupil capture is so fine but pupil player shows no error and doesn't run. I might try out compiling pupil player from source. Can you give me what is the way to give argument (recording file) to the program and run it? (e.g. python main.py path/to/file)


- I tried sudo modprobe usbcore autosuspend=-1 but it still doesn't work... actually, the app itself doesn’t launch since I once upgraded numpy (it used to run for 5 mins before that.)
when I run pupil_capture, the error looks like this.
Traceback (most recent call last)
  File "<string>", line 80, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller-2.1-py2.7.egg/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/eye", line 20, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller-2.1-py2.7.egg/PyInstaller/loader/pyi_importers.py", line 270, in load_module
  File "/home/mkassner/pupil/deploy_capture/build/bundle/out00-PYZ.pyz/methods", line 16, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PyInstaller-2.1-py2.7.egg/PyInstaller/loader/pyi_importers.py", line 414, in load_module
ImportError: /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: g_type_class_adjust_private_offset


- video meeting sounds good. What email address should I email to schedule a meeting?

Thanks,
Chihiro

chihiro suga

unread,
Oct 29, 2014, 10:16:15 PM10/29/14
to pupil-...@googlegroups.com
Hi Moritz,

After hours and hours of trial-and-errors I found a solution myself. I got Pupil Player working on my mac.

I realized that when I try to run pupil_player from terminal, it returns the errors like this:

 $ ./Pupil\ Player.app/Contents/MacOS/pupil_player ~/Desktop/pupil_recordings/2014_10_29/000
ERROR(AntTweakBar) >> Bad value
ERROR(AntTweakBar) >> Bad value [position        ...]
Traceback (most recent call last):
  File "<string>", line 480, in <module>
  File "<string>", line 391, in main
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/offline_marker_detector", line 112, in init_gui
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/atb", line 198, in __init__
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/atb", line 773, in define
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/atb", line 20, in check_error
Exception: Bad value [position        ...]
chihiro: /Applications/Pupil_Player$ Traceback (most recent call last):
  File "<string>", line 478, in <module>
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/billiard", line 137, in freeze_support
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/billiard.forking", line 335, in freeze_support
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/billiard.forking", line 458, in main
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/pickle", line 1378, in load
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/pickle", line 858, in load
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/pickle", line 1217, in load_build
  File "/Users/pupil/pupil/deploy_player/build/bundle/out00-PYZ.pyz/billiard.synchronize", line 110, in __setstate__
SystemError: error return without exception set

Then I came up with an idea to remove the pupil setting files that were automatically generated by the pupil_player before.
$ mv ~/Desktop/pupil_settings ~/Desktop/pupil_settings_back

After that, Pupil Player magically started working as it used to before! I never touched or edited files under pupil_settings. I even didn't notice that they existed. So I believe this is the bug you want to fix in the future releases.

So for now, my problem has solved and I no longer need a video conferencing to debug.

Thanks!
Chihiro

Moritz Kassner

unread,
Oct 30, 2014, 11:27:09 AM10/30/14
to pupil-...@googlegroups.com
Hi Chihiro,

thats great to hear! And thank you for the report.

Let me know if you should find yourself with new questions!

Best,

Moritz





Reply all
Reply to author
Forward
0 new messages