Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyotb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Nicolas Narçon
pyotb
Commits
9270f7ae
Commit
9270f7ae
authored
11 months ago
by
Vincent Delbar
Browse files
Options
Downloads
Patches
Plain Diff
BUG: fix error with ParameterType_Field
parent
cb37312e
Branches
bug-param-type-field
Tags
2.0.2.dev1
No related merge requests found
Pipeline
#15158
failed
11 months ago
Stage: Static Analysis
Stage: Tests
Stage: Documentation
Stage: Ship
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyotb/__init__.py
+1
-1
1 addition, 1 deletion
pyotb/__init__.py
pyotb/core.py
+7
-1
7 additions, 1 deletion
pyotb/core.py
with
8 additions
and
2 deletions
pyotb/__init__.py
+
1
−
1
View file @
9270f7ae
# -*- coding: utf-8 -*-
"""
This module provides convenient python wrapping of otbApplications.
"""
__version__
=
"
2.0.1
"
__version__
=
"
2.0.
2.dev
1
"
from
.install
import
install_otb
from
.helpers
import
logger
,
set_logger_level
...
...
This diff is collapsed.
Click to expand it.
pyotb/core.py
+
7
−
1
View file @
9270f7ae
...
...
@@ -1019,9 +1019,15 @@ class App(OTBObject):
self
.
app
.
ConnectImage
(
key
,
obj
.
app
,
obj
.
output_image_key
)
elif
isinstance
(
obj
,
otb
.
Application
):
self
.
app
.
ConnectImage
(
key
,
obj
,
get_out_images_param_keys
(
obj
)[
0
])
# SetParameterValue in OTB<7.4 doesn't work for ram parameter (see OTB issue 2200)
elif
key
==
"
ram
"
:
# SetParameterValue in OTB<7.4 doesn't work for ram parameter cf OTB issue 2200
self
.
app
.
SetParameterInt
(
"
ram
"
,
int
(
obj
))
# SetParameterValue doesn't work with ParameterType_Field (see pyotb GitHub issue #1)
elif
self
.
app
.
GetParameterType
(
key
)
==
otb
.
ParameterType_Field
:
if
isinstance
(
obj
,
(
list
,
tuple
)):
self
.
app
.
SetParameterStringList
(
key
,
obj
)
else
:
self
.
app
.
SetParameterString
(
key
,
obj
)
# Any other parameters (str, int...)
elif
not
isinstance
(
obj
,
(
list
,
tuple
)):
self
.
app
.
SetParameterValue
(
key
,
obj
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment