AttributeError in sinemixer example

24 views
Skip to first unread message

Rich E

unread,
Jun 23, 2010, 10:42:13 AM6/23/10
to pymt...@googlegroups.com
Hi all,

So I finally found some time to dig into the many examples and I have a couple issues.  I am not sure that I have a good enough grasp on how pymt has abstracted the many different windowing api's that I see in there (pygame, glut, pyglet?), so I will post this here for someone who knows the code better than myself.  I'd love to get these all working before starting on my own project.

So.. I run sinemixer (after installing ounk) and get:

pydev debugger: starting
[ [1;32mINFO [0m   ] PyMT v0.5-dev
[ [1;33mWARNING [0m] [Core    ] Accelerate module not available <No module named _accelerate>
[ [1;32mINFO [0m   ] [Logger  ] Record log in /home/r/.pymt/logs/pymt_10-06-24_2.txt
[ [1;33mWARNING [0m] [Core    ] Execute "python setup.py build_ext --inplace"
[ [1;33mWARNING [0m] [Extensions] _graphx not available: <No module named _graphx>
[ [1;32mINFO [0m   ] [Camera  ] using <gstreamer> as camera provider
[ [1;32mINFO [0m   ] [Text    ] using <pygame> as text provider
[ [1;32mINFO [0m   ] [Video   ] using <gstreamer> as video provider
[ [1;32mINFO [0m   ] [OSC     ] using <multiprocessing> for socket
[ [1;32mINFO [0m   ] [Loader  ] using <pygame> as thread loader
[ [1;32mINFO [0m   ] [Window  ] use Pygame as window provider.
[ [1;33mWARNING [0m] [WinPygame] Video: failed (multisamples=2)
[ [1;33mWARNING [0m] [Video   ] trying without antialiasing
[ [1;32mINFO [0m   ] [Window  ] OpenGL version <2.1 Mesa 7.7.1>
Traceback (most recent call last):
  File "/home/r/.eclipse/org.eclipse.platform_3.5.0_155965261/plugins/org.python.pydev.debug_1.5.7.2010050621/pysrc/pydevd.py", line 978, in <module>
    debugger.run(setup['file'], None, None)
  File "/home/r/.eclipse/org.eclipse.platform_3.5.0_155965261/plugins/org.python.pydev.debug_1.5.7.2010050621/pysrc/pydevd.py", line 780, in run
    execfile(file, globals, locals) #execute the script
  File "/home/r/code/pymt/examples/sinemixer/sinemixer.py", line 79, in <module>
    pymt_plugin_activate(w, ctx)
  File "/home/r/code/pymt/examples/sinemixer/sinemixer.py", line 30, in pymt_plugin_activate
    window_size = w.get_size()
AttributeError: 'MTWindowPygame' object has no attribute 'get_size'
nice: aoss: No such file or directory
Exception AttributeError: "'NoneType' object has no attribute 'print_exc'" in <bound method Popen.__del__ of <subprocess.Popen object at 0xbc78bac>> ignored


Cheers,
Rich

Mathieu Virbel

unread,
Jun 23, 2010, 10:47:52 AM6/23/10
to pymt...@googlegroups.com
Examples are not fixed in trunk/master. :)
(We don't maintain all examples after each commit we do)

Mathieu

2010/6/23 Rich E <rich....@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "pymt-dev" group.
> To post to this group, send email to pymt...@googlegroups.com.
> To unsubscribe from this group, send email to
> pymt-dev+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pymt-dev?hl=en.
>

Rich E

unread,
Jun 23, 2010, 11:34:12 AM6/23/10
to pymt...@googlegroups.com
I see.  Shall I keep things like this off of the mailing list then?  Is it worth mentioning it to you guys or will things like this get fixed when the time comes for a new release?

Sorry, I am just now digging into the pymt guts myself, after trying out the nice sequencer examples last month.  And the thing is, I'd really like to have the ounk (sinemixer) example working since I want to use pymt within an audio app and it looks like a great place to start.  Should I use the official released version, or is this an easy fix?  I looked for a while but got lost somewhere in the pygame abstraction.

Rich

Mathieu Virbel

unread,
Jun 23, 2010, 11:38:33 AM6/23/10
to pymt...@googlegroups.com
In /home/r/code/pymt/examples/sinemixer/sinemixer.py, replace
.get_size() by .size.

But they can be others errors. We'll do a complete pass for all
examples when changes will be finished (next week i hope). In the
meantime, mailing list or bugtracker is ok to use :)

I don't wanted to be rude, just inform that it can be normal if it's
not running. :)

Nathanaël Lécaudé

unread,
Jun 23, 2010, 11:48:13 AM6/23/10
to pymt...@googlegroups.com
Also, sinemixer probably won't survive very long because ounk is being phased out and replaced by the much powerful pyo : 

pyo is much easier to integrate with pymt and much faster also.

2010/6/23 Mathieu Virbel <txp...@gmail.com>

Rich E

unread,
Jun 25, 2010, 3:27:43 AM6/25/10
to pymt...@googlegroups.com
I got it working.  ounk didn't want to run the init when it was installed as a lib in /usr/local/ (installed from their setup.py script).  I had to move it to the sinemixer directory, and also copy over the scripts in ounk/settings into the main ounk directory.  Then, I have some pretty sinetone glissandos, woohoo.

Rich

 File "/home/r/code/pymt/examples/sinemixer/sinemixer.py", line 45, in on_value_change_callback
    ounk.sendOscControl(value, address='/pitch%d' % slider, port=9005)
  File "/usr/local/lib/python2.6/dist-packages/ounk/ounklib.py", line 3065, in sendOscControl
    osc.sendMsg(address, value, host, port)
  File "/usr/local/lib/python2.6/dist-packages/ounk/osc/oscAPI.py", line 61, in sendMsg
    outSocket.sendto( createBinaryMsg(oscAddress, dataArray),  (ipAddr, port))
AttributeError: 'int' object has no attribute 'sendto'

Reply all
Reply to author
Forward
0 new messages