Closed tufixm closed 8 years ago
Interesting use case. All of our sample projects rely on at least one other workflow, so in general our Mark workflows generate subjects. Subject generation may be a requirement at this point in Mark. While I sort this out, you should be able to just specify generates_subject: true
and use dummy generates_subject_type
values in each marking tool config (e.g. "mark_type_1", "mark_type_2"). This will cause subjects to be generated with those type
vals, even though they're not associated with any workflow.
Share your mark.json if this is confusing and I'll mark it up.
As for freeform polygon tools, we don't have any yet but hope to one day.
Thank you for your reply. I think I have more info about this issue and that it's not related to generates_subject: false
In fact, everything was working just fine for me last week and I was able to draw and annotate as many rectangles as I wanted to. Then... this happened. I should mention that this is not occurring only on my test project, but also happens when I load the ANZAC project locally.
My mark file has a single rectangle drawing task, which generates subject for a transcription task asking to name these rectangles.
Here's what happens:
if I go through the tutorial steps and click Done or if I try to close the tutorial window (X in the upper right corner), in the ruby console, I get a
_MOPED: 127.0.0.1:27017 QUERY database=scribe_api_development collection=projects selector={"$query"=>{}, "$orderby"=>{"updated_at"=>-1}} flags=[] limit=-1 skip=0 batchsize=nil fields=nil runtime: 135.7280ms Completed 500 Internal Server Error in 763ms
_NoMethodError - undefined method 'include?' for nil:NilClass:app/models/user.rb:106:in 'apply_configured_user_role' activesupport (4.0.2) lib/active_support/callbacks.rb:397:in '_run3393344869946990443createcallbacks' activesupport (4.0.2) lib/active_support/callbacks.rb:80:in 'run_callbacks' () Users/tufixm/.rvm/gems/ruby-2.1.5/bundler/gems/mongoid-7ae983a788c4/lib/mongoid/interceptable.rb:138:in 'run_callbacks' () Users/tufixm/.rvm/gems/ruby-2.1.5/bundler/gems/mongoid-7ae983a788c4/lib/mongoid/persistable/creatable.rb:117:in 'block in prepare_insert' activesupport (4.0.2) lib/active_support/callbacks.rb:373:in '_run3393344869946990443savecallbacks' activesupport (4.0.2) lib/active_support/callbacks.rb:80:in 'run_callbacks' () Users/tufixm/.rvm/gems/ruby-2.1.5/bundler/gems/mongoid-7ae983a788c4/lib/mongoid/interceptable.rb:138:in 'run_callbacks' () Users/tufixm/.rvm/gems/ruby-2.1.5/bundler/gems/mongoid-7ae983a788c4/lib/mongoid/persistable/creatable.rb:116:in 'prepare_insert' () Users/tufixm/.rvm/gems/ruby-2.1.5/bundler/gems/mongoid-7ae983a788c4/lib/mongoid/persistable/creatable.rb:23:in 'insert' () Users/tufixm/.rvm/gems/ruby-2.1.5/bundler/gems/mongoid-7ae983a788c4/lib/mongoid/persistable/savable.rb:23:in 'save' () Users/tufixm/.rvm/gems/ruby-2.1.5/bundler/gems/mongoid-7ae983a788c4/lib/mongoid/persistable/savable.rb:44:in 'save!' app/models/user.rb:186:in 'create_guest_user' app/controllers/application_controller.rb:33:in 'guest_user' app/controllers/application_controller.rb:25:in 'current_or_guest_user' app/controllers/application_controller.rb:10:in 'require_user!' app/controllers/users_controller.rb:11:in 'tutorial_complete' actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:4:in 'send_action' actionpack (4.0.2) lib/abstract_controller/base.rb:189:in 'process_action' actionpack (4.0.2) lib/action_controller/metal/rendering.rb:10:in 'process_action' actionpack (4.0.2) lib/abstract_controller/callbacks.rb:18:in 'block in process_action' activesupport (4.0.2) lib/active_support/callbacks.rb:393:in '_run2361297968526100186process_action__callbacks' activesupport (4.0.2) lib/active_support/callbacks.rb:80:in 'run_callbacks' actionpack (4.0.2) lib/abstract_controller/callbacks.rb:17:in 'process_action' actionpack (4.0.2) lib/action_controller/metal/rescue.rb:29:in 'process_action' actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:31:in 'block in process_action' activesupport (4.0.2) lib/active_support/notifications.rb:159:in 'block in instrument' activesupport (4.0.2) lib/active_support/notifications/instrumenter.rb:20:in 'instrument' activesupport (4.0.2) lib/active_support/notifications.rb:159:in 'instrument' actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:30:in 'process_action' actionpack (4.0.2) lib/action_controller/metal/params_wrapper.rb:245:in 'process_action' actionpack (4.0.2) lib/abstract_controller/base.rb:136:in 'process' actionpack (4.0.2) lib/abstract_controller/rendering.rb:44:in 'process' actionpack (4.0.2) lib/action_controller/metal.rb:195:in 'dispatch' actionpack (4.0.2) lib/action_controller/metal/rack_delegation.rb:13:in 'dispatch' actionpack (4.0.2) lib/action_controller/metal.rb:231:in 'block in action' actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:80:in 'call' actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:80:in 'dispatch' actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:48:in 'call' actionpack (4.0.2) lib/action_dispatch/journey/router.rb:71:in 'block in call' actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in 'each' actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in 'call' actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:680:in 'call' omniauth (1.2.2) lib/omniauth/strategy.rb:186:in 'call!' omniauth (1.2.2) lib/omniauth/strategy.rb:164:in 'call' omniauth (1.2.2) lib/omniauth/strategy.rb:186:in 'call!' omniauth (1.2.2) lib/omniauth/strategy.rb:164:in 'call' omniauth (1.2.2) lib/omniauth/strategy.rb:186:in 'call!' omniauth (1.2.2) lib/omniauth/strategy.rb:164:in 'call' rack-streaming-proxy (2.0.1) lib/rack/streaming_proxy/proxy.rb:103:in 'call' rack-cors (0.3.1) lib/rack/cors.rb:72:in 'call' warden (1.2.3) lib/warden/manager.rb:35:in 'block in call' warden (1.2.3) lib/warden/manager.rb:34:in 'catch' warden (1.2.3) lib/warden/manager.rb:34:in 'call' rack (1.5.2) lib/rack/etag.rb:23:in 'call' rack (1.5.2) lib/rack/conditionalget.rb:25:in 'call' rack (1.5.2) lib/rack/head.rb:11:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/params_parser.rb:27:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/flash.rb:241:in 'call' rack (1.5.2) lib/rack/session/abstract/id.rb:225:in 'context' rack (1.5.2) lib/rack/session/abstract/id.rb:220:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/cookies.rb:486:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:29:in 'block in call' activesupport (4.0.2) lib/active_support/callbacks.rb:373:in '_run1437993397042889364call__callbacks' activesupport (4.0.2) lib/active_support/callbacks.rb:80:in 'run_callbacks' actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:27:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/reloader.rb:64:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/remote_ip.rb:76:in 'call' better_errors (2.1.1) lib/better_errors/middleware.rb:84:in 'protected_app_call' better_errors (2.1.1) lib/better_errors/middleware.rb:79:in 'better_errors_call' better_errors (2.1.1) lib/better_errors/middleware.rb:57:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in 'call' railties (4.0.2) lib/rails/rack/logger.rb:38:in 'call_app' railties (4.0.2) lib/rails/rack/logger.rb:20:in 'block in call' activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in 'block in tagged' activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in 'tagged' activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in 'tagged' railties (4.0.2) lib/rails/rack/logger.rb:20:in 'call' quiet_assets (1.1.0) lib/quiet_assets.rb:27:in 'call_with_quiet_assets' actionpack (4.0.2) lib/action_dispatch/middleware/request_id.rb:21:in 'call' rack (1.5.2) lib/rack/methodoverride.rb:21:in 'call' rack (1.5.2) lib/rack/runtime.rb:17:in 'call' activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in 'call' rack (1.5.2) lib/rack/lock.rb:17:in 'call' actionpack (4.0.2) lib/action_dispatch/middleware/static.rb:64:in 'call' rack (1.5.2) lib/rack/sendfile.rb:112:in 'call' railties (4.0.2) lib/rails/engine.rb:511:in 'call' railties (4.0.2) lib/rails/application.rb:97:in 'call' rack (1.5.2) lib/rack/lock.rb:17:in 'call' rack (1.5.2) lib/rack/content_length.rb:14:in 'call' rack (1.5.2) lib/rack/handler/webrick.rb:60:in 'service' /Users/tufixm/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:in 'service' /Users/tufixm/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:in 'run' /Users/tufixm/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in 'block in startthread'
I can send you the full stack trace of the errors and the mark and transcribe files, but I'm afraid I don't have the right to attach files to a comment.
Do you have team_emails
defined in your project.json? If you don't, try setting it to []
(empty array) and re-run rake project:load[yourprojectdirectoryname,content]
That did it! Thank you. I can close it, if you don't consider it a bug.
Yeah this is a bug, but there's a general bug here that's not team_emails specific, so I described it here: https://github.com/zooniverse/scribeAPI/issues/459. Need to audit project fields for required-ness and make sure things don't fall apart when they're sensibly omitted, as you've done. Thanks for finding this.
Is there any reason for which a marking tool (e.g., rectangleTool) cannot be used to draw more than 1 rectangle when "generates_subject" is set on "false"? I have a use case in which I'd only need to "draw", but there's no transcription associated with what I've just drawn (in the logic of the drawing tools in Panoptes).
And a question aside: is there any polygon type of tool (similar to that in Panoptes) going to be included?
Cheers