david-cattermole / mayaMatchMoveSolver

A Bundle Adjustment solver for MatchMove related tasks.
https://david-cattermole.github.io/mayaMatchMoveSolver/
Other
102 stars 27 forks source link

Solver UI - Verbose Logging level Errors when Clicking Solve #143

Closed david-cattermole closed 4 years ago

david-cattermole commented 4 years ago

Problem / Feature

Trying to solve with the logging level set to "Verbose" using the Solver UI "Log" menu, causes an error when trying to solve

Expected behavior: If a user turns on "Verbose" logging level the Python logging module will still log "info" level messages, but the maya.cmds.mmSolver command will be given the "verbose=True" argument flag. Verbose printing in the mmSolver command should print out a lot of information while the solver is being run - on Linux this is visible in the Terminal, on Windows it's intended to be displayed in the Output Window (but current it is not printed at all on Windows, for an unknown reason).

Actual behavior: After a user opens the Solver UI and changes the Log level to "verbose", then tries to launch a solve, an exception is raised:

# Traceback (most recent call last):
#   File "C:\Users\user\Documents\maya\2017\modules\mayaMatchMoveSolver-0.3.3-maya2017-win64\python\mmSolver\tools\solver\ui\solver_window.py", line 626, in apply
#     self)
#   File "C:\Users\user\Documents\maya\2017\modules\mayaMatchMoveSolver-0.3.3-maya2017-win64\python\mmSolver\tools\solver\lib\collection.py", line 789, in run_solve_ui
#     info_fn=info_fn,
#   File "C:\Users\user\Documents\maya\2017\modules\mayaMatchMoveSolver-0.3.3-maya2017-win64\python\mmSolver\tools\solver\lib\collection.py", line 623, in execute_collection
#     log = mmSolver.logger.get_logger(tmp_log_level)
#   File "C:\Users\user\Documents\maya\2017\modules\mayaMatchMoveSolver-0.3.3-maya2017-win64\python\mmSolver\logger.py", line 70, in get_logger
#     log.setLevel(level)
#   File "C:\Program Files\Autodesk\Maya2017\bin\python27.zip\logging\__init__.py", line 1135, in setLevel
#     
#   File "C:\Program Files\Autodesk\Maya2017\bin\python27.zip\logging\__init__.py", line 182, in _checkLevel
#     
# ValueError: Unknown level: u'VERBOSE'

Steps to Reproduce

  1. Open the Solver UI
  2. Create a valid solve.
  3. Use "Log" menu and choose "Verbose".
  4. Press "Solve" button.
  5. Maya Script Editor displays above error.

Software Versions

Latest development version of mmSolver, on #65 (tools_issue65 branch).

david-cattermole commented 4 years ago

A fix has been merged into the develop branch ready for release in the next version.

Closing this issue.