Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • scenes scenes
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • 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
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • umr-tetisumr-tetis
  • scenesscenes
  • Issues
  • #22
Closed
Open
Issue created Jul 13, 2022 by Narcon Nicolas@nicolas.narconDeveloper

Pyotb 1.4.1 has introduced a bug

from scenes import spot

sc = spot.Spot67Scene(dimap_file_xs='DIM_SPOT6_MS_201503261014386_ORT_SPOT6_20170524_1422391k0ha487979cy_1.XML', dimap_file_pan='DIM_SPOT6_P_201503261014386_ORT_SPOT6_20170524_1422391k0ha487979cy_1.XML')
xs = sc.get_xs()
print(hasattr(xs, 'shape'))  # prints False
xs.shape  # Raises exception

Exception raised:

Traceback (most recent call last):
  File "/home/otbuser/.local/lib/python3.8/site-packages/pyotb/core.py", line 245, in __getattr__
    res = getattr(self.app, name)
  File "/opt/otbtf/lib/otb/python/otbApplication.py", line 2833, in __getattr__
    raise AttributeError("'%s' object has no attribute '%s'" % (Application.__name__, name))
AttributeError: 'Application' object has no attribute 'shape'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "tmp_bug_pyotb_dans_scenes.py", line 20, in <module>
    print(xs.shape)  ## Ceci fait planter le code 
  File "/home/otbuser/.local/lib/python3.8/site-packages/pyotb/core.py", line 248, in __getattr__
    raise AttributeError(f'{self.name}: Could not find attribute `{name}`') from e
AttributeError: Output out from ExtractROI: Could not find attribute `shape`
Edited Jul 13, 2022 by Narcon Nicolas
Assignee
Assign to
Time tracking