Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TVB EBRAINS Data
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Fousek
TVB EBRAINS Data
Commits
88e28582
Commit
88e28582
authored
3 years ago
by
Jan Fousek
Committed by
Administrator
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
reflected change in data proxy API
parent
30ba861a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tvb_ebrains_data/data.py
+5
-1
5 additions, 1 deletion
tvb_ebrains_data/data.py
with
5 additions
and
1 deletion
tvb_ebrains_data/data.py
+
5
−
1
View file @
88e28582
...
@@ -37,7 +37,11 @@ class DataProxyConnectivityDataset:
...
@@ -37,7 +37,11 @@ class DataProxyConnectivityDataset:
return
token
return
token
def
open_file
(
self
,
path
):
def
open_file
(
self
,
path
):
temporary_url
=
requests
.
get
(
f
"
{
self
.
DATA_PROXY_ENDPOINT
}
/datasets/
{
self
.
BUCKET_NAME
}
/
{
path
}
"
,
headers
=
self
.
AUTHORIZATION_HEADERS
)
temporary_url
=
requests
.
get
(
f
"
{
self
.
DATA_PROXY_ENDPOINT
}
/datasets/
{
self
.
BUCKET_NAME
}
/
{
path
}
"
,
headers
=
self
.
AUTHORIZATION_HEADERS
,
params
=
{
'
redirect
'
:
False
}
)
if
not
temporary_url
.
ok
:
if
not
temporary_url
.
ok
:
raise
Exception
(
f
'
Failed request:
{
temporary_url
.
reason
}
'
)
raise
Exception
(
f
'
Failed request:
{
temporary_url
.
reason
}
'
)
dl_url
=
temporary_url
.
json
()[
"
url
"
]
dl_url
=
temporary_url
.
json
()[
"
url
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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