Introducing spreads: command-line workflow tool

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.

Moderator: peterZ

andre_lafayette
Posts: 7
Joined: 27 Jun 2013, 05:14
E-book readers owned: Kindle
Number of books owned: 100
Country: United Kingdom

Re: Introducing spreads: command-line workflow tool

Post by andre_lafayette »

Thank you very much for your prompt and helpful reply and, of course, for developping spreads in the first place! I made the changes you suggested to the 0.3.3 source code ("0x323f" is the idProduct for the A810) and then installed using:

Code: Select all

sudo python setup.py install
The wizard now takes me further down the pipeline, but fails to configure my cameras:

Please connect and turn on the devices.
Press any key to continue.
Detecting devices.
PTPDevice: Could not get orientation, reason: Lua error: runtime error: :3: attempt to index global 'file' (a nil value)
PTPDevice: Could not get orientation, reason: Lua error: runtime error: :3: attempt to index global 'file' (a nil value)
Devices not yet configured!
Please turn both devices off. Press any key when ready.
Please connect and turn on the device labeled 'left'
Press any key when ready.
PTPDevice: Could not get orientation, reason: Lua error: runtime error: :3: attempt to index global 'file' (a nil value)
Configured 'left' device.
Please turn off the device.
Press any key when ready.
Please connect and turn on the device labeled 'right'
Press any key when ready.
PTPDevice: Could not get orientation, reason: Lua error: runtime error: :3: attempt to index global 'file' (a nil value)
Could not close session!
pyptpchdk: Could not close session!
Segmentation fault (core dumped)

As before, any help will be greatly appreciated! Thanks!
User avatar
jbaiter
Posts: 98
Joined: 17 Jun 2013, 16:42
E-book readers owned: 2
Number of books owned: 0
Country: Germany
Location: Munich, Germany
Contact:

Re: Introducing spreads: command-line workflow tool

Post by jbaiter »

Oops, that's a mistake in the code. The driver assumes that the orientation is already set during the initialization, which obviously fails in your case. I'll see what I can do about that, shouldn't be too difficult :-)

In the meantime, you can also try setting the orientation manually by creating a file "OWN.TXT" at the root of the SD-Card that contains either "LEFT" or "RIGHT".

P.S: I think it would be better if you opened a GitHub issue for every problem you encounter, this way we can keep this thread from cluttering up with debugging sessions and keep all development-related discussions right next to the code :-)

--
edit: I just pushed a fix to GitHub, can you make a checkout from the master branch and try again?
https://github.com/jbaiter/spreads/issues/15
spreads: Command-line workflow assistant
spomwii
Posts: 69
Joined: 17 Jun 2011, 07:57

Re: Introducing spreads: command-line workflow tool

Post by spomwii »

Hi jbaiter,

I have a kit from MarkDVB but I have not been scanning anything the last 5-6 months. I am back now and I was glad to see that this tool was released.

I have a dedicated Ubuntu 12.04lts machine for my scanner. I have tried to follow this guide http://spreads.readthedocs.org/en/latest/tutorial.html to install but I ran into a problem in the last line.

When I run this command: "~/.spreads/bin/activate" I get access denied error. I tried to run it with sudo and as root but with same error. My Linux knowledge is very limited so I don`t know what`s wrong here. Do you have any idea?

Tommy
User avatar
jbaiter
Posts: 98
Joined: 17 Jun 2013, 16:42
E-book readers owned: 2
Number of books owned: 0
Country: Germany
Location: Munich, Germany
Contact:

Re: Introducing spreads: command-line workflow tool

Post by jbaiter »

Oh, thanks for pointing that out, that's a mistake in the documentation :oops: . It should be "$ source ~/.spreads/bin/activate"!
spreads: Command-line workflow assistant
spomwii
Posts: 69
Joined: 17 Jun 2011, 07:57

Re: Introducing spreads: command-line workflow tool

Post by spomwii »

Ah, thanks. I will try again later today :)
code4maine
Posts: 3
Joined: 09 Aug 2013, 21:06
E-book readers owned: Unlocked Nook Classic, Nexus 7
Number of books owned: 200
Country: United States

Re: Introducing spreads: command-line workflow tool

Post by code4maine »

daniel_reetz wrote:I think that the integration of Spreads on a microcomputer may be the biggest thing to happen to DIY scanning in a long time. I'm really excited about what you're planning on doing, code4maine, and I want you to contact me if there is ANYTHING I can do to help. Software (and software/hardware interaction) is our biggest problem now that the scanning platform is somewhat standardized. Please let me know if you need some resource to get going.
Sorry for the delayed response but I was waiting for some additional components to get started on this project again and only just now saw your helpful reply.
A few questions- Have you been in contact with the fellow behind the RPi-scanner project on this page- https://wiki.harvard.edu/confluence/dis ... k+Scanners ?
I contacted him some time ago and he was kind enough to post all of his documentation onto Github- https://github.com/bensteinberg/diy-bookscanner
Also, (at risk of going too far OT) I wanted to ask if anybody from this forum is planning to be at the Open Source Hardware Summit (http://2013.oshwa.org/) in Cambridge MA next week on Sept.6th? If so it might be a great place to connect and exchange ideas with the best embedded developers in the world! Not to mention, attendees (who registered early enough) will get a preloaded e-badge which might be of interest for folks looking to build a truly DIY e-reader- http://wyolum.com/projects/badger/

Back to the topic-
I'm not too sure about that, running ScanTailor on a 400 page book scanned at 300dpi, distributed over 4 cores on my 2.8GHz Intel i5 machine already takes a considerable amount of time, I'm pretty certain that running it on a single-core ARM machine clocked at 1GHz would take prohibitively long.
Another way might be to look at more lightweight alternatives to ScanTailor. I began writing an "unpaper" plugin for Spreads, but gave up after I realized that the output from the tool was too unsatisfactory with the input from the DIYBookScanner. I remember reading somewhere about the Internet Archive's tool to crop their pages, maybe this is something that could be done on lower-spec machines instead of a full-blown ScanTailor run.
I'm very excited about what you will come up with and the experiences you'll make with the project, please keep us posted! :-)

As for Spreads, I'm putting last touches on the GUI wizard at the moment and made the CHDK driver a hell of a lot more stable, expect a new release within this week (I still have to update the documentation). Once that is out, I think I'll start writing the necessary plugins to run it headlessly from the Raspberry Pi, and control the scanning workflow through a web interface.

Now that I've had more time to try out the BeagleBone Black, I have to say it has a long ways to go before it lives up to its own potential, and likewise is not something I would recommend as an alternative to anything, let alone the RPi, at this point. On the other hand, developments in low-cost, embedded web controllers like the ElectricImp http://electricimp.com/ might allow for some of the more resource-intensive processing to migrate to the cloud. At the very least, it might be a way to control the scanning workflow from the web as you mentioned.

Also, I'm not sure if these will help in any way, but there are some OCR tools arising from the public sector that the civic hacking community has been using a lot lately. I figured I would post them in case they might be of any value-

1. DOCHIVE was created by journalists to scan PDF documents but is becoming popular as a tool for scanning public documents in municipal offices. Article on opensource.com-https://opensource.com/life/13/8/dochive-next-phase Github Repo- https://github.com/raleighpublicrecord/ ... er/dochive

2.The National Archives Github Repo https://github.com/usnationalarchives Might have some useful resources, though it mostly involves metadata analysis and database tools. They are adding more features soon however.

3. Library of Congress/National Digital Newspaper Program This is an enormous digitization project which has been going on for almost a decade so some input of the open source community might go a long way towards making their information more accessible. That said, some resources might be very valuable in the area of post-processing especially.
- Library of Congress Github Repo- https://github.com/LibraryOfCongress
-The University of North Texas put together this handy wiki outlining everything from OCR tools to Metadata evaluation used in the NDNP- https://github.com/drewhop/AutoHotkey/wiki
- The International Federation of Librarians put together this resource on best practices for digitization tools used in the NDNP- http://www.ifla.org/node/6777
- The Library of Congress also posts their own specs on usage of OCR at- http://www.loc.gov/ndnp/guidelines/digitizing.html

Its interesting from my perspective how much more complicated the LOC resources are than more recent OpenData catalogs released by other federal entities on Github. I'm guessing this is because the LOC started working in issues involving open data, and open source long before it became common practice. If anything it only confirms the potential for open source efforts like the DIYBS and SPREADS to have an enormous impact on the pubic sector. Especially on the grassroots/municipal level...
I'll be sure to report back on my experiments in using SPREADS and various embedded systems. If some of the other links I posted are of interest than feel free to message me or create a dedicated thread, so as to keep this thread on-topic.

Thank You All!
Andrew Jawitz
Brigade Captain
Code for Maine
http://www.code4maine.org
spomwii
Posts: 69
Joined: 17 Jun 2011, 07:57

Re: Introducing spreads: command-line workflow tool

Post by spomwii »

I am getting closer but still have a problem. My cameras are configured as right & left now and I get to the point where I am able to capture images. But when I am done capturing and hit a button to quit I get a lot of error messages. I hope someone can see what the messages mean.

Code: Select all

Starting capturing process
 ==========================
Setting up devices for capturing.
PTPDevice[right]: Script timed out, retrying...
PTPDevice[left]: Script timed out, retrying...
PTPDevice[right]: Script timed out, retrying...
PTPDevice[right]: Script timed out, retrying...
PTPDevice[right]: Script timed out, retrying...
PTPDevice[right]: Script timed out, retrying...
Press 'b' to capture.
Shot 4 pages [647/h]PTPDevice[right]: Script timed out, retrying...
Shot 6 pages [630/h]PTPDevice[right]: Script timed out, retrying...
Shot 8 pages [588/h]PTPDevice[right]: Script timed out, retrying...
PTPDevice[left]: Script timed out, retrying...
PTPDevice[left]: Script timed out, retrying...
Shot 10 pages in 1.2 minutes, average speed was 537 pages per hour=========================
 Starting download process
=========================
stevedore.extension: error calling 'chdkcamera': 'Device' object has no attribute 'bInterfaceSubClass'
stevedore.extension: 'Device' object has no attribute 'bInterfaceSubClass'
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 231, in match
    and hex(device.bInterfaceSubClass) == "0x1")
AttributeError: 'Device' object has no attribute 'bInterfaceSubClass'
Failed to connect (attempt 1), retrying in 1 s...
stevedore.extension: error calling 'chdkcamera': 'Device' object has no attribute 'bInterfaceSubClass'
stevedore.extension: 'Device' object has no attribute 'bInterfaceSubClass'
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 231, in match
    and hex(device.bInterfaceSubClass) == "0x1")
AttributeError: 'Device' object has no attribute 'bInterfaceSubClass'
Failed to connect (attempt 1), retrying in 1 s...
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
stevedore.extension: error calling 'chdkcamera': [Errno 13] Access denied (insufficient permissions)
stevedore.extension: [Errno 13] Access denied (insufficient permissions)
Traceback (most recent call last):
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/stevedore/extension.py", line 145, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreads/plugin.py", line 312, in match
    match = extension.plugin.match(device)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/spreadsplug/dev/chdkcamera.py", line 229, in match
    cfg = device.get_active_configuration()[(0, 0)]
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 558, in get_active_configuration
    return self._ctx.get_active_configuration(self)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 163, in get_active_configuration
    self.managed_open()
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/core.py", line 70, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 494, in open_device
    _check(_lib.libusb_open(dev.devid, byref(handle)))
  File "/home/tommy/.spreads/local/lib/python2.7/site-packages/usb/backend/libusb1.py", line 403, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
USBError: [Errno 13] Access denied (insufficient permissions)
There is a problem with your configuration file(s):
keep not found
Could not close session!
pyptpchdk: Could not close session!
Could not close session!
pyptpchdk: Could not close session!
(.spreads)tommy@tommy-ThinkPad-T61:~$ 
User avatar
jbaiter
Posts: 98
Joined: 17 Jun 2013, 16:42
E-book readers owned: 2
Number of books owned: 0
Country: Germany
Location: Munich, Germany
Contact:

Re: Introducing spreads: command-line workflow tool

Post by jbaiter »

Glad you got so far, spomwil, and welcome to the murky waters of close-to-metal software...
Errors from the "PTPDevice" class generally indicate that something is going wrong when communicating with the device. There could be a myriad reasons for this, but here are some pointers from my own experiences:
  • Are both devices running from the same USB hub? I've had issues with that, try attaching both of them directly to your computer (ideally not to the front panel either, there might be another hub there)
  • Check your cables (that one kept me busy for a whole week...)
  • Check your system log, are there any unusual messages concerning the USB subsystem? (/var/log/syslog)
  • Are there any services running on your computer that might interfere with the camera communication? See Mark's article [1] for more hints
  • Can you trigger the cameras with Mark's script? [2]
It seems that parallel triggering is still kind of unstable, maybe a command-line flag to switch to alternate triggering would be wise?

Concerning those 'insufficient permissions' error, check out the updated FAQ [3] (information on how to fix the permissions permanently will follow in the next few days...)
And for the error message concerning "keep" during download, that's a known bug in the CLI wizard and has been fixed in the development version[4], so you might want to install from GitHub.


[1] https://github.com/markvdb/diybookscann ... ur-cameras
[2] https://github.com/markvdb/diybookscanner
[3] http://spreads.readthedocs.org/en/latest/faq.html
[4] https://github.com/jbaiter/spreads/comm ... 390e5f68a8
spreads: Command-line workflow assistant
User avatar
daniel_reetz
Posts: 2812
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Introducing spreads: command-line workflow tool

Post by daniel_reetz »

jbaiter, do you recommend any particular flavor of linux? I nuked my out-of-date Ubuntu install, then installed Linux Mint, which time-vampired away the last three hours while I tried to get sound working.

Would be nice to have a target distro - though of course, I understand if you don't have any particular preference.
User avatar
jbaiter
Posts: 98
Joined: 17 Jun 2013, 16:42
E-book readers owned: 2
Number of books owned: 0
Country: Germany
Location: Munich, Germany
Contact:

Re: Introducing spreads: command-line workflow tool

Post by jbaiter »

Well, my personal favorite is Debian, for practical and philosophical reasons, but it can be a bit user-unfriendly, especially for beginners.
I've installed spreads on an Ubuntu VM and everything worked out of the box, so that's one distribution that I can recommend.
Sorry to hear about problems with sound, that can still be a problem under Linux, though much less so than just a few years back. If you want, you can PM me about your issues and maybe I can help.
That being said, spreads doesn't require sound at the moment, so that shouldn't be a showstopper ;)
spreads: Command-line workflow assistant
Post Reply