DIYBookScanner / spreads

Modular workflow assistant for book digitization
GNU Affero General Public License v3.0
125 stars 53 forks source link

Show advanced options does nothing #149

Closed atomotic closed 9 years ago

atomotic commented 9 years ago

i've just updated spreadpi Version 0.5git20141106.1250

when creating a workflow, the Show advanced options does nothing, i'm not able to inspect any error or activity inside the browser console.

maybe is something changed in the default config.yaml ?

driver: chdkcamera
plugins:
    - hidtrigger
    - web
core:
    verbose: yes
    logfile: /home/spreads/.config/spreads/spreads.log
    capture_keys: [' ', b]
    loglevel: debug
device:
    flip_target_pages: no
    parallel_capture: yes
    chdkptp_path: /usr/lib/chdkptp
    focus_distance: 0
web:
    project_dir: /home/spreads/scans
    debug: no
    standalone_device: yes
    mode: scanner
    port: 5000
jbaiter commented 9 years ago

Can you check your browser's JavaScript console for possible errors? I'll see if I can reproduce this, thanks for noticing!

atomotic commented 9 years ago

nothing in console. also the react-devtools extension does not tell me anything

screen shot 2014-11-07 at 11 09 24 am

jbaiter commented 9 years ago

Interesting.... Can you check in your development console what the window.configTemplates object contains under the device key? Also, can you run the application with --debug and check the log for suspicious messages?

atomotic commented 9 years ago

ill'try the debug now. the following is copy(window.configTemplates)

{
  "core": {
    "capture_keys": {
      "advanced": false,
      "depends": null,
      "docstring": "Keys to trigger capture",
      "selectable": false,
      "value": [
        " ",
        "b"
      ]
    },
    "logfile": {
      "advanced": false,
      "depends": null,
      "docstring": "Path to logfile",
      "selectable": false,
      "value": "/home/spreads/.config/spreads/spreads.log"
    },
    "loglevel": {
      "advanced": false,
      "depends": null,
      "docstring": "Logging level for logfile",
      "selectable": true,
      "value": [
        "debug",
        "info",
        "critical",
        "error",
        "warning"
      ]
    },
    "verbose": {
      "advanced": false,
      "depends": null,
      "docstring": "Enable verbose output",
      "selectable": false,
      "value": true
    }
  },
  "device": {
    "chdkptp_path": {
      "advanced": true,
      "depends": null,
      "docstring": "Path to CHDKPTP binary/libraries",
      "selectable": false,
      "value": "/usr/lib/chdkptp"
    },
    "dpi": {
      "advanced": false,
      "depends": null,
      "docstring": "The capturing resolution",
      "selectable": false,
      "value": 300
    },
    "flip_target_pages": {
      "advanced": false,
      "depends": null,
      "docstring": "Temporarily switch target pages (useful for e.g. East-Asian books)",
      "selectable": false,
      "value": false
    },
    "focus_distance": {
      "advanced": false,
      "depends": {
        "device": {
          "focus_mode": "manual"
        }
      },
      "docstring": "Distance to focus subject",
      "selectable": false,
      "value": 0
    },
    "focus_mode": {
      "advanced": false,
      "depends": null,
      "docstring": "Select focus mode",
      "selectable": true,
      "value": [
        "autofocus_all",
        "autofocus_initial",
        "manual"
      ]
    },
    "monochrome": {
      "advanced": false,
      "depends": null,
      "docstring": "Shoot in monochrome mode (reduces file size)",
      "selectable": false,
      "value": false
    },
    "parallel_capture": {
      "advanced": false,
      "depends": null,
      "docstring": "Trigger capture on multiple devices at once.",
      "selectable": false,
      "value": true
    },
    "sensitivity": {
      "advanced": false,
      "depends": null,
      "docstring": "The ISO sensitivity value",
      "selectable": false,
      "value": 80
    },
    "shoot_raw": {
      "advanced": true,
      "depends": null,
      "docstring": "Shoot in RAW format (DNG)",
      "selectable": false,
      "value": false
    },
    "shutter_speed": {
      "advanced": false,
      "depends": null,
      "docstring": "The shutter speed as a fraction",
      "selectable": false,
      "value": "1/25"
    },
    "upside_down": {
      "advanced": false,
      "depends": null,
      "docstring": "Cameras are mounted upside-down.",
      "selectable": false,
      "value": false
    },
    "whitebalance": {
      "advanced": true,
      "depends": null,
      "docstring": "White balance mode",
      "selectable": true,
      "value": [
        "Auto",
        "Cloudy",
        "Custom",
        "Daylight",
        "Fluorescent",
        "Fluorescent H",
        "Tungsten"
      ]
    },
    "zoom_level": {
      "advanced": false,
      "depends": null,
      "docstring": "The default zoom level",
      "selectable": false,
      "value": 3
    }
  },
  "web": {
    "debug": {
      "advanced": false,
      "depends": null,
      "docstring": "Run server in debugging mode",
      "selectable": false,
      "value": false
    },
    "mode": {
      "advanced": false,
      "depends": null,
      "docstring": "Mode to run server in",
      "selectable": true,
      "value": [
        "scanner",
        "full",
        "processor"
      ]
    },
    "port": {
      "advanced": false,
      "depends": null,
      "docstring": "TCP-Port to listen on",
      "selectable": false,
      "value": 5000
    },
    "postprocessing_server": {
      "advanced": false,
      "depends": null,
      "docstring": "Address of the postprocessing server",
      "selectable": false,
      "value": ""
    },
    "project_dir": {
      "advanced": false,
      "depends": null,
      "docstring": "Directory for project folders",
      "selectable": false,
      "value": "/home/spreads/scans"
    },
    "standalone_device": {
      "advanced": false,
      "depends": null,
      "docstring": "Server runs on a standalone device dedicated to scanning (e.g. 'spreadpi').",
      "selectable": false,
      "value": true
    }
  }
}
atomotic commented 9 years ago

this is the debug output. seems nothing suspicious

spreads@spreadpi ~ $ spread web --debug
spreadsplug.web: Starting scanning station server in "scanner" mode
spreadsplug.web: Starting server in debugging mode
spreads.plugin: Finding devices for driver "CHDKCameraDevice"
ChdkCamera: Device has serial number 4408811AEC7D4B299BB17DC84366833E
ChdkCamera: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=006 -b=001', '-eset cli_verbose=2', '-eluar return get_buildinfo()']
ChdkCamera: Call returned:
['connected: Canon PowerShot A2200, max packet size 512', '7:return:table:{platform="a2200",build_date="Sep  1 2014",build_number="1.3.0",build_time="01:46:56",version="CHDK",platsub="100d",build_revision="3602",platformid=12842,os="dryos",}']
ChdkCamera: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=006 -b=001', '-eset cli_verbose=2', '-eluar return get_zoom_steps()']
ChdkCamera: Call returned:
['connected: Canon PowerShot A2200, max packet size 512', '8:return:8']
ChdkCamera: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=006 -b=001', '-eset cli_verbose=2', '-edownload "OWN.TXT" /tmp/tmppJVPzB']
ChdkCamera: Call returned:
['connected: Canon PowerShot A2200, max packet size 512', 'A/OWN.TXT->/tmp/tmppJVPzB']
ChdkCamera: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=006 -b=001', '-eset cli_verbose=2', '-eluar exit_alt(); set_config_value(291, 0);enter_alt();']
ChdkCamera: Call returned:
['connected: Canon PowerShot A2200, max packet size 512']
ChdkCamera: Device has serial number 1460D867CDE54F59ACD8BC484EF1B8BF
ChdkCamera: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=007 -b=001', '-eset cli_verbose=2', '-eluar return get_buildinfo()']
ChdkCamera: Call returned:
['connected: Canon PowerShot A2200, max packet size 512', '7:return:table:{platform="a2200",build_date="Sep  1 2014",build_number="1.3.0",build_time="01:46:56",version="CHDK",platsub="100d",build_revision="3602",platformid=12842,os="dryos",}']
ChdkCamera: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=007 -b=001', '-eset cli_verbose=2', '-eluar return get_zoom_steps()']
ChdkCamera: Call returned:
['connected: Canon PowerShot A2200, max packet size 512', '8:return:8']
ChdkCamera: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=007 -b=001', '-eset cli_verbose=2', '-edownload "OWN.TXT" /tmp/tmpeu30j7']
ChdkCamera: Call returned:
['connected: Canon PowerShot A2200, max packet size 512', 'A/OWN.TXT->/tmp/tmpeu30j7']
ChdkCamera: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=007 -b=001', '-eset cli_verbose=2', '-eluar exit_alt(); set_config_value(291, 0);enter_alt();']
ChdkCamera: Call returned:
['connected: Canon PowerShot A2200, max packet size 512']
A2200Device[odd]: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=006 -b=001', '-eset cli_verbose=2', '-eluar enter_alt()']
A2200Device[odd]: Call returned:
['connected: Canon PowerShot A2200, max packet size 512']
A2200Device[odd]: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=006 -b=001', '-eset cli_verbose=2', '-eluar require("drawings");draw.add("rectf", 0, 0, get_gui_screen_width(),          get_gui_screen_height(), 256, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*1,          "", 258, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*2,          "    You can now access the web interface at:", 258, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*3,          "", 258, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*4,          "", 258, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*5,          "         http://10.0.23.244:5000", 258, 256);\ndraw.overdraw();']
A2200Device[odd]: Call returned:
['connected: Canon PowerShot A2200, max packet size 512']
A2200Device[even]: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=007 -b=001', '-eset cli_verbose=2', '-eluar enter_alt()']
A2200Device[even]: Call returned:
['connected: Canon PowerShot A2200, max packet size 512']
A2200Device[even]: Calling chdkptp with arguments: [u'/usr/lib/chdkptp/chdkptp', '-c-d=007 -b=001', '-eset cli_verbose=2', '-eluar require("drawings");draw.add("rectf", 0, 0, get_gui_screen_width(),          get_gui_screen_height(), 256, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*1,          "", 258, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*2,          "    You can now access the web interface at:", 258, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*3,          "", 258, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*4,          "", 258, 256);\ndraw.add("string", 0, 0+(get_gui_screen_height()/10)*5,          "         http://10.0.23.244:5000", 258, 256);\ndraw.overdraw();']
A2200Device[even]: Call returned:
['connected: Canon PowerShot A2200, max packet size 512']
huey.consumer.ConsumerThread: 1 worker threads
huey.consumer.ConsumerThread: Setting signal handler
huey.consumer.ConsumerThread: Huey consumer initialized with following commands
+ process_workflow
+ upload_workflow
+ transfer_to_stick
+ output_workflow
huey.consumer.ConsumerThread: Starting scheduler thread
huey.consumer.ConsumerThread: Starting worker threads
huey.consumer.ConsumerThread: Starting periodic task scheduler thread
root: Cache missed, instantiating workflow from /home/spreads/scans/prova.
Workflow: Initializing workflow /home/spreads/scans/prova
root: Adding setting shutter_speed from device
root: Adding setting upside_down from device
root: Adding setting flip_target_pages from device
root: Adding setting focus_distance from device
root: Adding setting sensitivity from device
root: Adding setting shoot_raw from device
root: Adding setting zoom_level from device
root: Adding setting chdkptp_path from device
root: Adding setting parallel_capture from device
root: Adding setting monochrome from device
root: Adding setting focus_mode from device
root: Adding setting whitebalance from device
root: Adding setting dpi from device
root: Adding setting loglevel from core
root: Adding setting capture_keys from core
root: Adding setting logfile from core
root: Adding setting verbose from core
root: Adding setting mode from web
root: Adding setting standalone_device from web
root: Adding setting debug from web
root: Adding setting postprocessing_server from web
root: Adding setting project_dir from web
root: Adding setting port from web
spreadsplug.hidtrigger: Initializing HidTrigger plugin
spreadsplug.hidtrigger: Found HID device: <hidapi.Device object at 0x2608e10>
spreadsplug.hidtrigger: Found HID device: <hidapi.Device object at 0x2613630>
spreadsplug.web.util: Using EXIF thumbnail for /home/spreads/scans/prova/data/raw/008.jpg
atomotic commented 9 years ago

i've just installed the latest build, problem persist. i should upgrade other packages?

root@spreadpi ~ # pip freeze
Warning: cannot find svn location for distribute==0.6.24dev-r0
Flask==0.10.1
Jinja2==2.6
MarkupSafe==0.15
PyYAML==3.11
Wand==0.3.5
Werkzeug==0.8.3
argparse==1.2.1
backports.ssl-match-hostname==3.4.0.2
blinker==1.3
certifi==14.05.14
cffi==0.8.1
chardet==2.0.1
colorama==0.2.4
## FIXME: could not find svn URL in dependency_links for this package:
distribute==0.6.24dev-r0
futures==2.1.6
hidapi-cffi==0.2.1
isbnlib==3.3.9
itsdangerous==0.24
jpegtran-cffi==0.5
netifaces==0.8
ply==3.4
psutil==2.1.1
pycparser==2.07
pyusb==1.0.0b1
requests==2.3.0
roman==2.0.0
six==1.1.0
spreads==0.5git20141119.7e17
tornado==4.0.1
urllib3==1.7.1
wsgiref==0.1.2
zipstream==1.0.4
jbaiter commented 9 years ago

Sorry, I haven't yet have had time to look into it :( It's probably an issue in the JavaScript client-side code that is unrelated to the server-side Python code.

atomotic commented 9 years ago

don't worry, there is no hurry. if you want when i'm at home i can give you ssh access to the raspberry, then you can tunnel *:5000

jbaiter commented 9 years ago

OK, so I just tried to reproduce this on my machine, to no avail. I tried with all plugins (gphoto2, chdk, dummy) and two browsers (Firefox, Chrome), the checkbox toggles the display of the advanced option every time, both when creating a workflow and when editing it.

You installed from the nightly build, right? Can you confirm that it works when you set debug in the web-plugin options to yes? I think the buildbot fails to build the production JavaScript bundle...

atomotic commented 9 years ago

Version 0.5git20141125.dade debug: yes in config/web

nothing happens in creating the workflow.

the configure popup works instead when called from capture screen

boredland commented 9 years ago

Doesn't show any options for me (browsers chrome, internet explorer and firefox, chrome and firefox on windows and ubuntu): http://awesomescreenshot.com/08946e9nf0

jbaiter commented 9 years ago

Is this still an issue? I made some tests with the latest image/nightly code and didn't notice any problems, neither in the preferences nor the per-workflow configuration.

atomotic commented 9 years ago

sorry i forgot to close this ticket using now 0.5git20150328.c525 everything is fine thanks