Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11909

giza: UnboundLocalError: local variable 'task_result' referenced before assignment

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 0.1

      ----------------------------

      Original Description

      Trying to build ruby driver documentation:

      speed% git clone https://github.com/mongodb/docs-ruby
      Cloning into 'docs-ruby'...
      remote: Counting objects: 687, done.
      remote: Compressing objects: 100% (13/13), done.
      remote: Total 687 (delta 6), reused 8 (delta 3), pack-reused 671
      Receiving objects: 100% (687/687), 231.38 KiB | 8.26 MiB/s, done.
      Resolving deltas: 100% (382/382), done.
      speed% cd docs-ruby 
      speed% 
      speed% make html
      giza generate assets
      INFO:giza.content.assets:cloned master branch from repo https://github.com/mongodb/bson-ruby.git
      INFO:giza.content.assets:cloned master branch from repo https://github.com/mongodb/docs-tools.git
      INFO:giza.content.assets:cloned master branch from repo https://github.com/mongodb/mongo-ruby-driver.git
      Making target source directory -- doing this explicitly instead of via cp
      if [ -d source-master ]; then rm -rf source-master ; fi;
      mkdir source-master
      Copying over ruby-driver docs files
      cp -R build/ruby-driver-master/docs/* source-master
      Copying over bson  docs files
      cp -R build/bson-ruby/docs/* source-master
      giza make html
      INFO:giza.operations.make:running sphinx build operation, equivalent to: giza sphinx --builder html
      INFO:giza.content.assets:updated /home/w/tmp/docs-ruby/build/docs-tools repository
      INFO:giza.content.assets:updated /home/w/tmp/docs-ruby/build/bson-ruby repository
      INFO:giza.content.assets:updated /home/w/tmp/docs-ruby/build/ruby-driver-master repository
      INFO:giza.content.source:created directory for sphinx build: /home/w/tmp/docs-ruby/build/master/source-master
      INFO:giza.content.source:prepared and migrated source for sphinx build in /home/w/tmp/docs-ruby/build/master/source-master
      INFO:giza.operations.sphinx:adding builder job for html (None, None)
      INFO:giza.content.sphinx:Starting sphinx build: sphinx-build -t website -t web -t html -q -b html -c /home/w/tmp/docs-ruby -d /home/w/tmp/docs-ruby/build/master/doctrees-html /home/w/tmp/docs-ruby/build/master/source-master /home/w/tmp/docs-ruby/build/master/html
      **ERROR:giza.pool:caught error "[Errno 2] No such file or directory", waiting for other tasks to finish**
      Traceback (most recent call last):
        File "/home/w/bin/giza", line 11, in <module>
          sys.exit(main())
        File "/home/w/.local/lib/python2.7/site-packages/giza/cmdline.py", line 163, in main
          argh.dispatch(parser, namespace=args)
        File "/home/w/.local/lib/python2.7/site-packages/argh/dispatching.py", line 174, in dispatch
          for line in lines:
        File "/home/w/.local/lib/python2.7/site-packages/argh/dispatching.py", line 277, in _execute_command
          for line in result:
        File "/home/w/.local/lib/python2.7/site-packages/argh/dispatching.py", line 231, in _call
          result = function(namespace_obj)
        File "/home/w/.local/lib/python2.7/site-packages/giza/operations/make.py", line 140, in main
          run_make_operations(targets, conf)
        File "/home/w/.local/lib/python2.7/site-packages/giza/operations/make.py", line 235, in run_make_operations
          sphinx_publication(conf, app)
        File "/home/w/.local/lib/python2.7/site-packages/giza/operations/sphinx_cmds.py", line 113, in sphinx_publication
          return sphinx_builder_tasks(app, conf)
        File "/home/w/.local/lib/python2.7/site-packages/giza/operations/sphinx_cmds.py", line 125, in sphinx_builder_tasks
          app.run()
        File "/home/w/.local/lib/python2.7/site-packages/giza/libgiza/app.py", line 421, in run
          self.results.extend(self.pool.runner(self.queue))
        File "/home/w/.local/lib/python2.7/site-packages/giza/libgiza/pool.py", line 79, in runner
          return self.get_results(self.async_runner(jobs))
        File "/home/w/.local/lib/python2.7/site-packages/giza/libgiza/pool.py", line 160, in get_results
          retval.append((idx, task_result))
      UnboundLocalError: local variable 'task_result' referenced before assignment
      make: *** [Makefile:27: html] Error 1
      

      The highlighted line says a file was not found but does not say which file, making this error impossible to diagnose and repair.
      ----------------------------

      Description

      Scope of changes (files that need work and how much)

      Impact to other docs outside of this product

      MVP (work and date?)

      Resources (e.g. Scope Docs, Invision)

            Assignee:
            andrew.aldridge@mongodb.com Andrew Aldridge
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 9 weeks, 6 days ago