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

Getting scantailor error during postprocessing #220

Open
meelash opened this issue Mar 9, 2016 · 6 comments
Open

Getting scantailor error during postprocessing #220

meelash opened this issue Mar 9, 2016 · 6 comments

Comments

@meelash
Copy link

meelash commented Mar 9, 2016

huey.consumer.ConsumerThread: Unhandled exception in worker thread
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/spreads/vendor/huey/consumer.py", line 149, in process_task
self.huey.execute(task)
File "/usr/local/lib/python2.7/dist-packages/spreads/vendor/huey/api.py", line 236, in execute
result = task.execute()
File "/usr/local/lib/python2.7/dist-packages/spreads/vendor/huey/api.py", line 415, in execute
return func(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/spreadsplug/web/tasks.py", line 1 66, in process_workflow
workflow.process()
File "/usr/local/lib/python2.7/dist-packages/spreads/workflow.py", line 972, i n process
self._run_hook('process', self.pages, processed_path)
File "/usr/local/lib/python2.7/dist-packages/spreads/workflow.py", line 833, i n _run_hook
getattr(plug, hook_name)(*args)
File "/usr/local/lib/python2.7/dist-packages/spreadsplug/scantailor.py", line 285, in process
projectfile, out_dir)
File "/usr/local/lib/python2.7/dist-packages/spreadsplug/scantailor.py", line 113, in _generate_configuration
marginconf = self.config['margins'].as_str_seq()
File "/usr/local/lib/python2.7/dist-packages/spreads/vendor/confit.py", line 3 98, in as_str_seq
'a list'.format(self.name)
ConfigTypeError: scantailor.margins must be a whitespace-separated string or a l ist

@meelash
Copy link
Author

meelash commented Mar 9, 2016

This happens whether automargins is on or off, detection set to page or content.
I've attached my config.yaml file and a sample photo.

config.txt

@meelash
Copy link
Author

meelash commented Mar 9, 2016

raw

@meelash
Copy link
Author

meelash commented Mar 10, 2016

By the way this happens with a freshly-created, unmodified config.yaml file also, using all defaults.

@jbaiter
Copy link
Member

jbaiter commented Mar 10, 2016

How are you triggering the post-processing? From the web-interface or via the command-line?
The webui-support for post-processing is still experimental, if you run into problems give the command-line a shot.

@meelash
Copy link
Author

meelash commented Mar 11, 2016

Thanks for the suggestion; I am triggering using the web-interface. However, I've confirmed that the issue is related to the quality of the scan. As you can see from the sample scan, I was just testing out the system without lights, etc. I've now installed lights and captured another set of scans and can confirm that with all the same settings, scantailor post processing fails on the poorly-lit set and not on the well-lit set.

In case it means anything to anyone, I threw in a log of the scantailor.margins variable on the line right before where the error is thrown and in the well-lit set of scans (doesn't fail) it prints this to console:
spreadsplug.scantailor: the margins are: [2.5, 2.5, 2.5, 2.5]
whereas for the poorly-lit set of scans (fails, example scan above) it prints this to console:
spreadsplug.scantailor: the margins are: 2.5

I unfortunately don't have my development machine with me at the moment (for the next few months) or I would investigate further, but if anyone is interested in looking into it and needs anything from me to help repeat it, I'd be happy to help as much as I can.

@jbaiter
Copy link
Member

jbaiter commented Mar 11, 2016

Wow, that is really weird. The error occurs in a part of the code that is completely oblivious to what's in the images, so the quality should not have any effect.
I suspect this is a bug in the way the web-interface initiates the post-processing (which is a bit over-engineered, tbh). Can you check if the error also occurs when you start the post-processing with the badly lit scan on the command-line?

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