Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P py_tools_ds
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Daniel Scheffler
  • py_tools_ds
  • Merge requests
  • !34

Fixed AttributeError in ProgressBar in case sys.stderr is None. Added tests for processing module.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Daniel Scheffler requested to merge bugfix/fix_NonetypeError into master Nov 24, 2021
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 3

This fixes the following AttributeError in case sys.stderr is None which is ...

usually the case for Windows GUI apps that aren’t connected to a console and Python apps started with pythonw.

Traceback (most recent call last):
File "C:\Users/PedroVenancio/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Coregistration\automated_local_coregistration_algorithm.py", line 278, in processAlgorithm
CRL.correct_shifts()
File "C:\Users\PedroVenancio\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\Coregistration\extlibs_windows\arosics\CoReg_local.py", line 810, in correct_shifts
self.calculate_spatial_shifts()
File "C:\Users\PedroVenancio\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\Coregistration\extlibs_windows\arosics\CoReg_local.py", line 480, in calculate_spatial_shifts
self._tiepoint_grid.get_CoRegPoints_table()
File "C:\Users\PedroVenancio\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\Coregistration\extlibs_windows\arosics\Tie_Point_Grid.py", line 419, in get_CoRegPoints_table
bar.print_progress((i + 1) / len(GDF) * 100)
File "C:\Users\PedroVenancio\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\Coregistration\extlibs_windows\py_tools_ds\processing\progress_mon.py", line 124, in print_progress
self.out.write('\r')
AttributeError: 'NoneType' object has no attribute 'write'

See here.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bugfix/fix_NonetypeError