Papaya icon indicating copy to clipboard operation
Papaya copied to clipboard

There was a problem reading that file (myfilename.nii.gz): Response status = 0

Open whiteneng opened this issue 3 years ago • 3 comments

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.

image

whiteneng avatar May 03 '21 10:05 whiteneng

this file path is error,i think your can see example firstly or["myfilename.nii.gz", "Untitled.nii.gz"] image

oraclexudehua avatar May 06 '21 02:05 oraclexudehua

@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 avatar Jun 09 '21 13:06 matheussouza9

@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

cynde avatar Oct 19 '22 08:10 cynde