Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
talent
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Hoksza
talent
Commits
0256b900
Commit
0256b900
authored
5 years ago
by
David Hoksza
Browse files
Options
Downloads
Patches
Plain Diff
try to utf encode
parent
b798b8fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gui_config.ini
+2
-2
2 additions, 2 deletions
gui_config.ini
talent/utils/convert.py
+7
-3
7 additions, 3 deletions
talent/utils/convert.py
with
9 additions
and
5 deletions
gui_config.ini
+
2
−
2
View file @
0256b900
[input]
openTgtFileDir
=
C:/projects/git/talent/tmp/journal.pcbi.1002577.s002.XML
openTmpFileDir
=
C:/projects/git/talent/tmp/
pd_test2.sb
ml
openTmpFileDir
=
C:/projects/git/talent/tmp/
glycolisis.x
ml
openOutputPathButton
=
C:/projects/git/talent/out
openOutputPath
=
C:/projects/git/talent/out
opnBcFile
=
C:/projects/git/talent/out/
temp
.pkl
opnBcFile
=
C:/projects/git/talent/out/
journalpcbi1002577s002--from--multiple-tgt-ddup_True_tmp-ddup_False
.pkl
cbTgtType
=
1
cbTmpType
=
1
This diff is collapsed.
Click to expand it.
talent/utils/convert.py
+
7
−
3
View file @
0256b900
...
...
@@ -49,11 +49,15 @@ def minerva_convert(in_string: str, in_format: str, out_format: str, minerva_ins
# response = requests.post(api_address, cookies=dict(MINERVA_AUTH_TOKEN=token), data=in_string)
headers
=
{
'
Content-Type
'
:
'
text/xml; charset=utf-8
'
,
}
response
=
requests
.
post
(
api_address
,
data
=
in_string
,
headers
=
headers
)
# response = requests.post(api_address, data=in_string.encode('utf-8'), headers=headers)
response
=
requests
.
post
(
api_address
,
data
=
in_string
.
encode
(
'
utf-8
'
),
headers
=
headers
)
if
response
.
status_code
==
500
:
# TODO: this is not the optimal way. THere is surely a better way how to pass the information about the encoding to the server
response
=
requests
.
post
(
api_address
,
data
=
in_string
,
headers
=
headers
)
result
=
response
.
content
if
out_format
==
"
pdf
"
or
out_format
==
"
png
"
else
response
.
text
return
result
return
result
co
def
sbml_convert
(
sbml_string
:
str
,
format
:
str
,
minerva_instance
:
str
):
...
...
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