mtp-lastfm "coercing to Unicode" error

Bug #577978 reported by David Ashford
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MTP-Lastfm
Fix Committed
Undecided
Unassigned

Bug Description

Hi,

mtp-lastfm freezes at the point of cross checking with the local database. The error in errors.log is:

[Sun May 9 21:38:16 2010]:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/mtplastfm/main.py", line 154, in on_check_device_clicked
    "album" : unicode(mtpconnect.get_album(), 'utf-8'),
TypeError: coercing to Unicode: need string or buffer, NoneType found

Running 0.85.2 on Lucid. The program starts checking but freezes at the same artist each time. I've still been able to scrobble the tracks but I'm unsure if the program is able to check all the tracks on the player.

summary: - mtp-lastfm coercing to Unicode error
+ mtp-lastfm "coercing to Unicode" error
Revision history for this message
Daniel Woodhouse (wodemoneke) wrote : Re: [Bug 577978] [NEW] mtp-lastfm "coercing to Unicode" error

Thanks for your report David, I don't currently have regular access to a
computer at the moment but I'll take a look at this when I get a chance.

On Sun, May 9, 2010 at 9:49 PM, David Ashford <email address hidden>wrote:

> Public bug reported:
>
> Hi,
>
> mtp-lastfm freezes at the point of cross checking with the local
> database. The error in errors.log is:
>
> [Sun May 9 21:38:16 2010]:
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.6/mtplastfm/main.py", line 154, in
> on_check_device_clicked
> "album" : unicode(mtpconnect.get_album(), 'utf-8'),
> TypeError: coercing to Unicode: need string or buffer, NoneType found
>
> Running 0.85.2 on Lucid. The program starts checking but freezes at the
> same artist each time. I've still been able to scrobble the tracks but
> I'm unsure if the program is able to check all the tracks on the player.
>
> ** Affects: mtp-lastfm
> Importance: Undecided
> Status: New
>
> ** Summary changed:
>
> - mtp-lastfm coercing to Unicode error
> + mtp-lastfm "coercing to Unicode" error
>
> --
> mtp-lastfm "coercing to Unicode" error
> https://bugs.launchpad.net/bugs/577978
> You received this bug notification because you are subscribed to MTP-
> Lastfm.
>
> Status in MTP-Lastfm: New
>
> Bug description:
> Hi,
>
> mtp-lastfm freezes at the point of cross checking with the local database.
> The error in errors.log is:
>
> [Sun May 9 21:38:16 2010]:
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.6/mtplastfm/main.py", line 154, in
> on_check_device_clicked
> "album" : unicode(mtpconnect.get_album(), 'utf-8'),
> TypeError: coercing to Unicode: need string or buffer, NoneType found
>
> Running 0.85.2 on Lucid. The program starts checking but freezes at the
> same artist each time. I've still been able to scrobble the tracks but I'm
> unsure if the program is able to check all the tracks on the player.
>
>
>

Revision history for this message
Daniel Woodhouse (wodemoneke) wrote :

David can I get you to download the latest source from http://github.com/woodenbrick/mtp-lastfm
compile (see README for instructions) and see if this fixes the problem.

Revision history for this message
David Ashford (ashford-david) wrote :

I built the module in the src directory as the instructions in the readme:

python setup.py build_ext --inplace
./mtp-lastfm

The program starts but crashes with a segmentation fault when scanning the player:

david@Aegena:~/Desktop/woodenbrick-mtp-lastfm-32c7338$ ./mtp-lastfm
User authenticated
Device 0 (VID=041e and PID=413e) is a Creative ZEN Vision:M.
PTP_ERROR_IO: Trying again after re-initializing USB interface
Successfully connected
Segmentation fault

Revision history for this message
Daniel Woodhouse (wodemoneke) wrote :

Sorry, I've made a change so test it again. I don't have anyway of testing anything from my current location but this hopefully works.

Revision history for this message
David Ashford (ashford-david) wrote :

Just build from source there and it worked perfectly. Scanned the entire device without freezing and picked up tracks it hadn't scrobbled. Thanks Daniel

Changed in mtp-lastfm:
status: New → Fix Committed
Revision history for this message
moge (moge) wrote :

[Mon Aug 23 20:37:36 2010]:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/mtplastfm/main.py", line 154, in on_check_device_clicked
    "album" : unicode(mtpconnect.get_album(), 'utf-8'),
TypeError: coercing to Unicode: need string or buffer, NoneType found

MTP-Lastfm 0.85.2

Revision history for this message
moge (moge) wrote :

new version new problem...
MTP-Lastfm 0.82.3 (woodenbrick)

after running in terminal:

Connection Time allowance: 15 seconds
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/moge/Desktop/woodenbrick-mtp-lastfm-9a6ef66/mtplastfm/main.py", line 48, in connect_to_mtp_device
    process = subprocess.call("mtp-tracks", stdout=dump)
  File "/usr/lib/python2.6/subprocess.py", line 480, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Revision history for this message
Daniel Woodhouse (wodemoneke) wrote :

Hi Moge,

Sorry I took so long to get back to you, can you try he latest source in github as the problem should be fixed. It's just I didn't package it well and version numbers of 0.85.2 is actually more than one version.

The problem using the older version is caused because you need the mtp-tools package installed.

Revision history for this message
moge (moge) wrote :

Thanks, now I use 0.86 and everything is fine :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.