Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sounddevice in windows using cygwin - issues with FFILibrary #27

Closed
davrandom opened this issue Jun 29, 2016 · 5 comments
Closed

sounddevice in windows using cygwin - issues with FFILibrary #27

davrandom opened this issue Jun 29, 2016 · 5 comments

Comments

@davrandom
Copy link

Hi,

not quite sure this is the right place to post this issue, but I hope you can help.
I'm running smoothly sounddevice under macos, now I need to make my scripts to work also on Windows.
I have installed cygwin and from there I have installed Python2.7, libffi-devel and portaudio2. The error I get when importing portaudio (in ipython) is this:

In [1]: import sounddevice
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-20b0e45d0855> in <module>()
----> 1 import sounddevice

/usr/lib/python2.7/site-packages/sounddevice.py in <module>()
   2530
   2531
-> 2532 _ignore_stderr()
   2533 _initialize()
   2534

/usr/lib/python2.7/site-packages/sounddevice.py in _ignore_stderr()
   2518     try:
   2519         stdio = ffi.dlopen(None)
-> 2520         devnull = stdio.fopen(_os.devnull.encode(), b'w')
   2521     except OSError:
   2522         return

/usr/lib/python2.7/site-packages/cffi/api.pyc in __getattr__(self, name)
    835     class FFILibrary(object):
    836         def __getattr__(self, name):
--> 837             make_accessor(name)
    838             return getattr(self, name)
    839         def __setattr__(self, name, value):

/usr/lib/python2.7/site-packages/cffi/api.pyc in make_accessor(name)
    831                 if name not in accessors:
    832                     raise AttributeError(name)
--> 833             accessors[name](name)
    834     #
    835     class FFILibrary(object):

/usr/lib/python2.7/site-packages/cffi/api.pyc in accessor_function(name)
    776             value = backendlib.load_function(BType, name)
    777         except KeyError as e:
--> 778             raise AttributeError('%s: %s' % (name, e))
    779         library.__dict__[name] = value
    780     #

AttributeError: fopen: "function 'fopen' not found in library '<None>': No such                   process"

thanks for your help.
d

@mgeier
Copy link
Member

mgeier commented Jun 30, 2016

Can you please try if #28 works for you?

@davrandom
Copy link
Author

Works fine! Thanks for the hyper fast fix ;)
d

@mgeier mgeier closed this as completed in #28 Jul 4, 2016
@mgeier
Copy link
Member

mgeier commented Jul 4, 2016

Thanks for testing!

Just out of curiosity: Is there any unwanted output on cygwin?
In other words, if you just write the line import sounddevice in a script and run it, is there any output at all?

@davrandom
Copy link
Author

davrandom commented Jul 4, 2016 via email

@mgeier
Copy link
Member

mgeier commented Jul 5, 2016

That's good to know, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants