bugCompact Disc Input and Control Library - Bugs: bug #38477, inconsistent API for str vs unicode


bug #38477: inconsistent API for str vs unicode

Submitted by:  Thomas Vander Stichele <thomasvs>
Submitted on:  Wed 06 Mar 2013 03:34:52 PM UTC  
Category:  Python Severity:  5 - Average
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 07 Mar 2013 12:04:46 AM UTC, comment #1:

See if the commit 003bcbf fixes.

Rocky Bernstein <rocky>
Project Administrator
Wed 06 Mar 2013 03:34:52 PM UTC, original submission:

This commit: http://git.savannah.gnu.org/gitweb/?p=libcdio/pycdio.git;a=commitdiff;h=1e1c7975c799e9daa595b99aa6ab989a9d4f0959

changed the return type for get_devices_with_cap from list of str to list of unicode.

However, other functions do not accept unicode.

See the below python shell session to demonstrate the issue:

>>> import cdio
>>> cdio.get_devices_with_cap(pycdio.FS_MATCH_ALL, False)

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'pycdio' is not defined

>>> import pycdio
>>> cdio.get_devices_with_cap(pycdio.FS_MATCH_ALL, False)


>>> pycdio.open_cd(u'/dev/cdrom')

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pycdio.py", line 835, in open_cd
return _pycdio.open_cd(*args)
TypeError: in method 'open_cd', argument 1 of type 'char const *'

>>> pycdio.open_cd('/dev/cdrom')

<Swig Object of type 'CdIo_t *' at 0x7f6e2eb1a720>

Thomas Vander Stichele <thomasvs>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rocky (Posted a comment)
  • -email is unavailable- added by thomasvs (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-16 rocky Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.3