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

Pitch finding dies on unexpected json inputs #42

Closed
dellsystem opened this issue Jun 27, 2012 · 2 comments
Closed

Pitch finding dies on unexpected json inputs #42

dellsystem opened this issue Jun 27, 2012 · 2 comments

Comments

@dellsystem
Copy link
Member

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/execute/trace.py", line 181, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/wliu/rodan_source/rodan/jobs/utils.py", line 55, in real_inner
    outputs = f(*input_paths, **kwargs)
  File "/home/wliu/rodan_source/rodan/jobs/pitch_finding.py", line 25, in pitch_find
    recognized_glyphs = aomr_obj.run(glyphs, poly_list)
  File "/home/wliu/rodan_source/rodan/jobs/aomr_resources/AomrObject.py", line 104, in run
    self.find_staves(poly_list)
  File "/home/wliu/rodan_source/rodan/jobs/aomr_resources/AomrObject.py", line 242, in find_staves
    diff_lo = avg_lines[3]-avg_lines[2]
IndexError: list index out of range

Found 1 staff. The JSON produced by staff-finding looks like this:

[[[[1084, 215], [1086, 215], [1164, 215], [1170, 215]]], [[[701, 1833], [776, 1833]]]
@dellsystem
Copy link
Member Author

It also dies for a different reason (not really sure what it is yet):

[2012-06-29 23:48:52,310: DEBUG/PoolWorker-2] Running the finding code.
[2012-06-29 23:48:52,311: WARNING/PoolWorker-2] 1. Finding staves.
[2012-06-29 23:48:52,886: WARNING/PoolWorker-2] 2. Finding staff coordinates
[2012-06-29 23:48:52,886: WARNING/PoolWorker-2] 3a. Finding technique is miyao.
[2012-06-29 23:48:52,909: ERROR/MainProcess] Task rodan.jobs.pitch_finding.pitch_find[4d4210b7-4ded-439a-ac04-1cc9f616ce63] raised exception: TypeError("'NoneType' object is not iterable",)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/execute/trace.py", line 181, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/wliu/rodan_source/rodan/jobs/utils.py", line 56, in real_inner    outputs = f(*input_paths, **kwargs)
  File "/home/wliu/rodan_source/rodan/jobs/pitch_finding.py", line 25, in pitch_find
    recognized_glyphs = aomr_obj.run(glyphs, poly_list)
  File "/home/wliu/rodan_source/rodan/jobs/aomr_resources/AomrObject.py", line 111, in run
    self.sglyphs = self.miyao_pitch_finder(page_glyphs)
  File "/home/wliu/rodan_source/rodan/jobs/aomr_resources/AomrObject.py", line 379, in miyao_pitch_finder
    line_or_space, line_num = self._return_line_or_space_no(g, center_of_mass, staff_locations, miyao_line) # line (0) or space (1), no
TypeError: 'NoneType' object is not iterable

@alastair
Copy link
Contributor

alastair commented Jul 1, 2012

Pitch finding now generates its own staff lines again. Moving this out to non-urgent because json is no longer here

@alastair alastair closed this as completed Jul 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants