Papaya
Papaya copied to clipboard
There was a problem reading that file (myfilename.nii.gz): Response status = 0
Dears.
I am facing some weired error. I tried to automatically load images with following codes, however I had message as title. "There was a problem reading that file (myfilename.nii.gz): Response status = 0"
Is there any problem on my code? I tried to load without installing or building.
How can I solve this issue? Thank you for your works, Best regards.. Yong-Hwan
Here is my "index.html"
<!-- iOS meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" type="text/css" href="./papaya.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="./papaya.js?build=1449"></script>
<title>Papaya Viewer</title>
<script type="text/javascript">
var params = [];
params["worldSpace"] = false;
params["images"] = ["./myfilename.nii.gz", "./Untitled.nii.gz"];
params["Untitled.nii.gz"] = {"min": 0.75, "max": 0.8, "lut": "Red Overlay"};
</script>
</head>
<body>
<div class="papaya" data-params="params"></div>
</body>
----------------------------------------------------------------------------------------------------------------------------------------
And, files are exist as followed.
this file path is error,i think your can see example firstly or["myfilename.nii.gz", "Untitled.nii.gz"]
@whiteneng Have you tried to host these files on a server instead using the file system? A simple server like builtin python http server should work.
On the dir you want, just run python -m http.server 8000
and the files will be served. (ps: you don't need to write any python code. You just need to have python installed on your machine)
@matheussouza9 so how do you write the url for the data-param? when I use builtin python http server, the error is still the same which is Response status = 0