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

'NoneType' object has no attribute '__getitem__' after rip with current master (a3e9260) #196

Closed
Freso opened this issue Sep 20, 2017 · 7 comments · Fixed by #336
Closed
Labels
Accepted Accepted issue on our roadmap Bug Generic bug: can be used together with more specific labels Needed: discussion More discussion needed before anything can be done (or still no agreement has been reached) Needed: patch A pull request is required Priority: medium Medium priority
Milestone

Comments

@Freso
Copy link
Member

Freso commented Sep 20, 2017

If I rip a disc (using whipper cd --device='/dev/cdrom' rip --cdr --prompt --working-directory='/tmp/rip-disc.h2w' --output-directory='/home/freso/tmp/'), I end getting this output after an otherwise successful rip:

Traceback (most recent call last):                
  File "/usr/bin/whipper", line 11, in <module>
    load_entry_point('whipper==0.5.1', 'console_scripts', 'whipper')()
  File "/usr/lib/python2.7/site-packages/whipper/command/main.py", line 32, in main
    ret = cmd.do()
  File "/usr/lib/python2.7/site-packages/whipper/command/basecommand.py", line 124, in do
    return self.cmd.do()
  File "/usr/lib/python2.7/site-packages/whipper/command/basecommand.py", line 124, in do
    return self.cmd.do()
  File "/usr/lib/python2.7/site-packages/whipper/command/cd.py", line 190, in do
    self.doCommand()
  File "/usr/lib/python2.7/site-packages/whipper/command/cd.py", line 488, in doCommand
    self.program.verifyImage(self.runner, self.ittoc)
  File "/usr/lib/python2.7/site-packages/whipper/common/program.py", line 588, in verifyImage
    return accurip.verify_result(self.result, responses, checksums)
  File "/usr/lib/python2.7/site-packages/whipper/common/accurip.py", line 237, in verify_result
    _assign_checksums_and_confidences(tracks, checksums, responses)
  File "/usr/lib/python2.7/site-packages/whipper/common/accurip.py", line 190, in _assign_checksums_and_confidences
    track.AR[v]['CRC'] = checksums[v][i]
TypeError: 'NoneType' object has no attribute '__getitem__'
> yaourt -Qi whipper-git|grep -i version
Version                : 0.5.1.r68.ga3e9260-1
@RecursiveForest
Copy link
Contributor

Are there any data tracks?

@RecursiveForest RecursiveForest self-assigned this Sep 23, 2017
@RecursiveForest RecursiveForest added the Bug Generic bug: can be used together with more specific labels label Sep 23, 2017
@Freso
Copy link
Member Author

Freso commented Sep 24, 2017

Are there any data tracks?

No.

@danadam
Copy link

danadam commented Oct 17, 2017

I have the same problem and my CD has a data track pregap, I think (track 0):

Artist  : Pyotr Ilyich Tchaikovsky, Ludwig van Beethoven; Antal Doráti, Minneapolis Symphony Orchestra
Title   : Tchaikovsky: 1812 Overture / Tchaikovsky: Capriccio Italien / Beethoven: Wellington's Victory
Duration: 01:06:03.000
URL     : https://musicbrainz.org/release/092bcb27-2adb-43ae-93c7-bc53d5f68db3
Release : 092bcb27-2adb-43ae-93c7-bc53d5f68db3
Type    : Album
Barcode : 028943436021
Cat no  : 434 360-2

creating output directory ./album/Pyotr Ilyich Tchaikovsky, Ludwig van Beethoven; Antal Doráti, Minneapolis Symphony Orchestra - Tchaikovsky - 1812 Overture - Tchaikovsky - Capriccio Italien - Beethoven - Wellington's Victory
found Hidden Track One Audio from frame 0 to 31
Ripping track 0 of 6: 00. Pyotr Ilyich Tchaikovsky, Ludwig van Beethoven; Antal Doráti, Minneapolis Symphony Orchestra - Hidden Track One Audio.flac
CRCs match for track 0
Peak level: 0.00%
Rip quality: 100.00%
HTOA discarded, contains digital silence
Ripping track 1 of 6: 01. Peter Ilyich Tchaikovsky - 1812 Festival Overture, op. 49.flac
...
Ripping track 6 of 6: 06. Deems Taylor - Commentary to _Wellington's Victory_.flac
CRCs match for track 6
Peak level: 100.00%
Rip quality: 100.00%
Traceback (most recent call last):
    ...

@danadam
Copy link

danadam commented Oct 22, 2017

So I tried again but I enabled debug logs, and with another album I had problems with, Florence + the Machine MTV Unplugged, it showed that it found 5 AccuRip results in the cache. Cleaning the cache solved the problem for both albums.

@RecursiveForest
Copy link
Contributor

That's fascinating, does clearing the cache solve Freso's problem too? (Backup cache contents instead of deleting so we can test further if it does, please.)

@JoeLametta
Copy link
Collaborator

Any news about this one?

@MerlijnWajer
Copy link
Collaborator

MerlijnWajer commented Apr 6, 2018

In the archive fork I purposely broke the cache code since it caused a lot of issues and headaches, to no real gain.

@JoeLametta JoeLametta added Accepted Accepted issue on our roadmap Priority: medium Medium priority Needed: patch A pull request is required Needed: discussion More discussion needed before anything can be done (or still no agreement has been reached) labels Nov 13, 2018
@JoeLametta JoeLametta added this to the 2.0 milestone Nov 13, 2018
JoeLametta added a commit that referenced this issue Sep 17, 2020
Whipper's caching implementation causes a few issues (#196, #230, [#321 (comment)](#321 (comment))) and complicates the code: it's better to drop this feature.

The rip resume feature doesn't work anymore: if possible it will be restored in the future.

* Remove caching item from TODO
* Delete unneeded files related to caching
* Update 'common/directory.py' & 'test/test_common_directory.py' (caching removal)
* Update 'common/accurip.py' & 'test/test_common_accurip.py' (caching removal)
* Update 'common/program.py' (caching removal)
* Update 'command/cd.py' (caching removal)

This fixes #335, fixes #196 and fixes #230.

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug Generic bug: can be used together with more specific labels Needed: discussion More discussion needed before anything can be done (or still no agreement has been reached) Needed: patch A pull request is required Priority: medium Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants