-
Notifications
You must be signed in to change notification settings - Fork 30
python -m utils.run_scan fails #8
Comments
ah, it looks like this is the result of some hacky assumptions. The basic idea on line 45 is, we want to put the newly scanned cards in the 'next' box. i.e., if there are at least some boxes in the collection which are named numerically, we find the largest of those, and add 1. This is failing because, in a new collection, there are no boxes at all. I'll implement a slightly more robust next_box logic. Eventually, 'box' as a varchar label might be replaced by something a bit more robust, if there's a strong need for it. |
commit f284743 should fix this |
@YenTheFirst I have zero Python experience, having a hard time getting things started here. After finally managing to install all dependencies, when I run the script I get this: scanning 01
File "D:\Projects\3rd Party\card_scan\utils\run_scan.py", line 18, in capture_ I'm on Windows, not sure if I installed incorrect versions of anything (I did have to manually edit Elixir because it was importing incorrectly from SQLAlchemy) |
run_scan seems to fail for me
meyers@tinylappy:~/Dropbox/Code/card_scan$ python -m utils.run_scan
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/meyers/Dropbox/Code/card_scan/utils/run_scan.py", line 45, in
next_box = session.query(func.max(sqlalchemy.cast(InvCard.box, sqlalchemy.Integer))).first()[0] + 1
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
The text was updated successfully, but these errors were encountered: