Closed zhouyi0812 closed 10 months ago
If you mean Google GCE, you have root on the hosts and can install whatever you want, including conda, and through conda, caiman. Same deal with Amazon's EC2.
Thank you!!!!!! May I ask a follow-up question. I successful installed necessary package on my virtual environment. Somehow I just can't run the jupyter notebook. I followed the youtube to configure the external ip address, but it still doesn't work.
(base) yyizhou812@instance-1:~$ conda activate caiman
(caiman) yyizhou812@instance-1:~$ caimanmanager install
2023-10-11 23:47:07.331377: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE4.1 SSE4.2 AVX AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Installed /home/yyizhou812/caiman_data
(caiman) yyizhou812@instance-1:~$ jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser &
[1] 3108
(caiman) yyizhou812@instance-1:~$ [I 2023-10-11 23:47:58.438 ServerApp] Package notebook took 0.0000s to import
[I 2023-10-11 23:47:58.976 ServerApp] Package ipyparallel took 0.5368s to import
[W 2023-10-11 23:47:58.976 ServerApp] A _jupyter_server_extension_points
function was not found in ipyparallel. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-11 23:47:58.992 ServerApp] Package jupyter_lsp took 0.0153s to import
[W 2023-10-11 23:47:58.992 ServerApp] A _jupyter_server_extension_points
function was not found in jupyter_lsp. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-11 23:47:58.997 ServerApp] Package jupyter_server_terminals took 0.0046s to import
[I 2023-10-11 23:47:58.997 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-10-11 23:47:59.039 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-10-11 23:47:59.040 ServerApp] A _jupyter_server_extension_points
function was not found in notebook_shim. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-11 23:48:00.920 ServerApp] Package panel.io.jupyter_server_extension took 1.8793s to import
[I 2023-10-11 23:48:00.920 ServerApp] ipyparallel | extension was successfully linked.
[I 2023-10-11 23:48:00.920 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-10-11 23:48:00.928 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-10-11 23:48:00.936 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-10-11 23:48:00.943 ServerApp] notebook | extension was successfully linked.
[I 2023-10-11 23:48:00.945 ServerApp] Writing Jupyter server cookie secret to /home/yyizhou812/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2023-10-11 23:48:00.950 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-10-11 23:48:00.950 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
[I 2023-10-11 23:48:00.973 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-10-11 23:48:00.975 ServerApp] Loading IPython parallel extension
[I 2023-10-11 23:48:00.975 ServerApp] ipyparallel | extension was successfully loaded.
[I 2023-10-11 23:48:00.979 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-10-11 23:48:00.981 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-10-11 23:48:00.985 LabApp] JupyterLab extension loaded from /home/yyizhou812/miniforge3/envs/caiman/lib/python3.11/site-packages/jupyterlab
[I 2023-10-11 23:48:00.985 LabApp] JupyterLab application directory is /home/yyizhou812/miniforge3/envs/caiman/share/jupyter/lab
[I 2023-10-11 23:48:00.986 LabApp] Extension Manager is 'pypi'.
[I 2023-10-11 23:48:00.993 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-10-11 23:48:00.998 ServerApp] notebook | extension was successfully loaded.
[I 2023-10-11 23:48:00.999 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded.
[I 2023-10-11 23:48:00.999 ServerApp] The port 8888 is already in use, trying another port.
[I 2023-10-11 23:48:01.000 ServerApp] Serving notebooks from local directory: /home/yyizhou812
[I 2023-10-11 23:48:01.000 ServerApp] Jupyter Server 2.7.3 is running at:
[I 2023-10-11 23:48:01.000 ServerApp] http://instance-1:8889/tree?token=267588efd23ebf69a37a27e0ff6461ecb43b774cf6ec2df9
[I 2023-10-11 23:48:01.000 ServerApp] http://127.0.0.1:8889/tree?token=267588efd23ebf69a37a27e0ff6461ecb43b774cf6ec2df9
[I 2023-10-11 23:48:01.000 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-10-11 23:48:01.003 ServerApp]
To access the server, open this file in a browser:
file:///home/yyizhou812/.local/share/jupyter/runtime/jpserver-3108-open.html
Or copy and paste one of these URLs:
http://instance-1:8889/tree?token=267588efd23ebf69a37a27e0ff6461ecb43b774cf6ec2df9
http://127.0.0.1:8889/tree?token=267588efd23ebf69a37a27e0ff6461ecb43b774cf6ec2df9
[I 2023-10-11 23:48:01.032 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
^C
(caiman) yyizhou812@instance-1:~$ jupyter notebook --ip=0.0.0.0 --port=6666 --no-browser &
[2] 3133
(caiman) yyizhou812@instance-1:~$ [I 2023-10-11 23:51:24.015 ServerApp] Package notebook took 0.0000s to import
[I 2023-10-11 23:51:24.389 ServerApp] Package ipyparallel took 0.3730s to import
[W 2023-10-11 23:51:24.389 ServerApp] A _jupyter_server_extension_points
function was not found in ipyparallel. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-11 23:51:24.400 ServerApp] Package jupyter_lsp took 0.0111s to import
[W 2023-10-11 23:51:24.401 ServerApp] A _jupyter_server_extension_points
function was not found in jupyter_lsp. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-11 23:51:24.405 ServerApp] Package jupyter_server_terminals took 0.0037s to import
[I 2023-10-11 23:51:24.405 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-10-11 23:51:24.435 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-10-11 23:51:24.435 ServerApp] A _jupyter_server_extension_points
function was not found in notebook_shim. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-11 23:51:25.785 ServerApp] Package panel.io.jupyter_server_extension took 1.3495s to import
[I 2023-10-11 23:51:25.785 ServerApp] ipyparallel | extension was successfully linked.
[I 2023-10-11 23:51:25.786 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-10-11 23:51:25.790 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-10-11 23:51:25.796 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-10-11 23:51:25.801 ServerApp] notebook | extension was successfully linked.
[I 2023-10-11 23:51:25.805 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-10-11 23:51:25.805 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
[I 2023-10-11 23:51:25.820 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-10-11 23:51:25.821 ServerApp] Loading IPython parallel extension
[I 2023-10-11 23:51:25.822 ServerApp] ipyparallel | extension was successfully loaded.
[I 2023-10-11 23:51:25.824 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-10-11 23:51:25.824 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-10-11 23:51:25.826 LabApp] JupyterLab extension loaded from /home/yyizhou812/miniforge3/envs/caiman/lib/python3.11/site-packages/jupyterlab
[I 2023-10-11 23:51:25.827 LabApp] JupyterLab application directory is /home/yyizhou812/miniforge3/envs/caiman/share/jupyter/lab
[I 2023-10-11 23:51:25.827 LabApp] Extension Manager is 'pypi'.
[I 2023-10-11 23:51:25.831 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-10-11 23:51:25.834 ServerApp] notebook | extension was successfully loaded.
[I 2023-10-11 23:51:25.834 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded.
[I 2023-10-11 23:51:25.835 ServerApp] Serving notebooks from local directory: /home/yyizhou812
[I 2023-10-11 23:51:25.835 ServerApp] Jupyter Server 2.7.3 is running at:
[I 2023-10-11 23:51:25.835 ServerApp] http://instance-1:6666/tree?token=74acc2eb46bfe8e2f5dbae49c4666bf74121886f967355df
[I 2023-10-11 23:51:25.835 ServerApp] http://127.0.0.1:6666/tree?token=74acc2eb46bfe8e2f5dbae49c4666bf74121886f967355df
[I 2023-10-11 23:51:25.835 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-10-11 23:51:25.837 ServerApp]
To access the server, open this file in a browser:
file:///home/yyizhou812/.local/share/jupyter/runtime/jpserver-3133-open.html
Or copy and paste one of these URLs:
http://instance-1:6666/tree?token=74acc2eb46bfe8e2f5dbae49c4666bf74121886f967355df
http://127.0.0.1:6666/tree?token=74acc2eb46bfe8e2f5dbae49c4666bf74121886f967355df
[I 2023-10-11 23:51:25.855 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
When you're trying to access the host with your browser, what URL are you using?
I use the 34.135.12.17:8888 (which is external ip address + 8888) But I also install caiman in my vm instance ssh. I was hoping to open the jupyter notebook just like in the local computer. But that doesn't work so I tried that ip address.
When you launch jupyter, try launching it like this:
jupyter notebook --ip 34.135.12.17
Give it a go with that.
(caiman) yyizhou812@instance-1:~$ jupyter notebook --ip 34.135.12.177
[I 2023-10-12 00:09:50.425 ServerApp] Package notebook took 0.0000s to import
[I 2023-10-12 00:09:50.808 ServerApp] Package ipyparallel took 0.3824s to import
[W 2023-10-12 00:09:50.809 ServerApp] A _jupyter_server_extension_points
function was not found in ipyparallel. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-12 00:09:50.821 ServerApp] Package jupyter_lsp took 0.0117s to import
[W 2023-10-12 00:09:50.821 ServerApp] A _jupyter_server_extension_points
function was not found in jupyter_lsp. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-12 00:09:50.825 ServerApp] Package jupyter_server_terminals took 0.0040s to import
[I 2023-10-12 00:09:50.825 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-10-12 00:09:50.856 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-10-12 00:09:50.856 ServerApp] A _jupyter_server_extension_points
function was not found in notebook_shim. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-12 00:09:52.174 ServerApp] Package panel.io.jupyter_server_extension took 1.3175s to import
[I 2023-10-12 00:09:52.175 ServerApp] ipyparallel | extension was successfully linked.
[I 2023-10-12 00:09:52.175 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-10-12 00:09:52.179 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-10-12 00:09:52.185 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-10-12 00:09:52.189 ServerApp] notebook | extension was successfully linked.
[I 2023-10-12 00:09:52.194 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-10-12 00:09:52.194 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
[I 2023-10-12 00:09:52.210 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-10-12 00:09:52.211 ServerApp] Loading IPython parallel extension
[I 2023-10-12 00:09:52.211 ServerApp] ipyparallel | extension was successfully loaded.
[I 2023-10-12 00:09:52.213 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-10-12 00:09:52.214 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-10-12 00:09:52.216 LabApp] JupyterLab extension loaded from /home/yyizhou812/miniforge3/envs/caiman/lib/python3.11/site-packages/jupyterlab
[I 2023-10-12 00:09:52.216 LabApp] JupyterLab application directory is /home/yyizhou812/miniforge3/envs/caiman/share/jupyter/lab
[I 2023-10-12 00:09:52.217 LabApp] Extension Manager is 'pypi'.
[I 2023-10-12 00:09:52.221 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-10-12 00:09:52.223 ServerApp] notebook | extension was successfully loaded.
[I 2023-10-12 00:09:52.224 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded.
Traceback (most recent call last):
File "/home/yyizhou812/miniforge3/envs/caiman/bin/jupyter-notebook", line 10, in
Oh, right. I forgot a detail.
On the host, please do ifconfig -a
and paste the results here.
Thank you!
(caiman) yyizhou812@instance-1:~$ ifconfig -a -bash: ifconfig: command not found
/sbin/ifconfig -a
(caiman) yyizhou812@instance-1:~$ /sbin/ifconfig -a ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460 inet 10.128.0.2 netmask 255.255.255.255 broadcast 10.128.0.2 inet6 fe80::4001:aff:fe80:2 prefixlen 64 scopeid 0x20 ether 42:01:0a:80:00:02 txqueuelen 1000 (Ethernet) RX packets 62863 bytes 1148051860 (1.0 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 29916 bytes 2794138 (2.6 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
jupyter notebook --ip 10.128.0.2 --port 8000
Then point your browser at http://34.135.12.177:8000
the page can't open: http://34.135.12.177:8000/
caiman) yyizhou812@instance-1:~$ jupyter notebook --ip 10.128.0.2 --port 8000
[I 2023-10-12 00:39:50.652 ServerApp] Package notebook took 0.0000s to import
[I 2023-10-12 00:39:51.561 ServerApp] Package ipyparallel took 0.9086s to import
[W 2023-10-12 00:39:51.561 ServerApp] A _jupyter_server_extension_points
function was not found in ipyparallel. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-12 00:39:51.604 ServerApp] Package jupyter_lsp took 0.0418s to import
[W 2023-10-12 00:39:51.604 ServerApp] A _jupyter_server_extension_points
function was not found in jupyter_lsp. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-12 00:39:51.616 ServerApp] Package jupyter_server_terminals took 0.0114s to import
[I 2023-10-12 00:39:51.616 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-10-12 00:39:51.662 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-10-12 00:39:51.662 ServerApp] A _jupyter_server_extension_points
function was not found in notebook_shim. Instead, a _jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-12 00:39:54.021 ServerApp] Package panel.io.jupyter_server_extension took 2.3576s to import
[I 2023-10-12 00:39:54.022 ServerApp] ipyparallel | extension was successfully linked.
[I 2023-10-12 00:39:54.022 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-10-12 00:39:54.027 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-10-12 00:39:54.032 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-10-12 00:39:54.037 ServerApp] notebook | extension was successfully linked.
[I 2023-10-12 00:39:54.047 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-10-12 00:39:54.047 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
[I 2023-10-12 00:39:54.082 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-10-12 00:39:54.086 ServerApp] Loading IPython parallel extension
[I 2023-10-12 00:39:54.086 ServerApp] ipyparallel | extension was successfully loaded.
[I 2023-10-12 00:39:54.089 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-10-12 00:39:54.090 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-10-12 00:39:54.101 LabApp] JupyterLab extension loaded from /home/yyizhou812/miniforge3/envs/caiman/lib/python3.11/site-packages/jupyterlab
[I 2023-10-12 00:39:54.101 LabApp] JupyterLab application directory is /home/yyizhou812/miniforge3/envs/caiman/share/jupyter/lab
[I 2023-10-12 00:39:54.102 LabApp] Extension Manager is 'pypi'.
[I 2023-10-12 00:39:54.106 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-10-12 00:39:54.109 ServerApp] notebook | extension was successfully loaded.
[I 2023-10-12 00:39:54.110 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded.
[I 2023-10-12 00:39:54.110 ServerApp] Serving notebooks from local directory: /home/yyizhou812
[I 2023-10-12 00:39:54.110 ServerApp] Jupyter Server 2.7.3 is running at:
[I 2023-10-12 00:39:54.110 ServerApp] http://10.128.0.2:8000/tree?token=cac480eeb9ddee4f26ca5125a9a8056bc4d7948923513d7e
[I 2023-10-12 00:39:54.110 ServerApp] http://127.0.0.1:8000/tree?token=cac480eeb9ddee4f26ca5125a9a8056bc4d7948923513d7e
[I 2023-10-12 00:39:54.110 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2023-10-12 00:39:54.114 ServerApp] No web browser found: Error('could not locate runnable browser').
[C 2023-10-12 00:39:54.114 ServerApp]
To access the server, open this file in a browser:
file:///home/yyizhou812/.local/share/jupyter/runtime/jpserver-1262-open.html
Or copy and paste one of these URLs:
http://10.128.0.2:8000/tree?token=cac480eeb9ddee4f26ca5125a9a8056bc4d7948923513d7e
http://127.0.0.1:8000/tree?token=cac480eeb9ddee4f26ca5125a9a8056bc4d7948923513d7e
[I 2023-10-12 00:39:54.132 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
I think I did this first: (caiman) yyizhou812@instance-1:~$ jupyter notebook --ip 10.128.0.2 --port 8000
and then open http://34.135.12.17:8000/ in my browser but doesn't work and the page is 404
It is what you meant? Thanks!
You actually get a 404 when you do that, or does your browser return some other error?
If it's a 404 we can look into it, but if your browser just gets a timeout, then what we probably need to do is write an IAM policy allowing incoming port 8000 and attach it to your instance.
After I click the link it took a while to bring me to the page. And it shows like this:
Ah, ok. So that's not a 404.
So, to fix this, these are the steps: 1) Go to the IAM console on Google Cloud 2) Write a policy allowing incoming access to port 8000 on TCP (IPv4 and IPv6) 3) Attach the polcy to your instance
I am more familiar with doing this on AWS than Google Cloud, but I believe the process is the same conceptually; I will not be able to guide you through it with more precision than these broad outlines.
Incidentally, for debugging this, you'll want to allow access from anywhere to port 8000 incoming on TCP, but once you have it working, you'll want to tighten the policy so it only allows access from your (work or home) IP address, so you won't end up accidentally giving the entire world access to your Jupyter.
Thank you thank you!
I am able to successfully set up the notebook. Just.....it is blank again when I open it. Does reinstallment work for this case?
Thank you!
That's probably the remaining thing to do, yes. I think you're very close to having it working.
Thank you! I successfully figure out running notebook.
But one thing get weird. When I import the movie
fnames = '098C1d16_B2_C1_1_00d00h00m.tif' m_orig = cm.load(fnames) downsample_ratio = .2 # motion can be perceived better when downsampling in time m_orig.resize(1, 1, downsample_ratio).play(q_max=99.5, fr=10, magnification=1) # play movie (press q to exit)
and there is an error which no show when I use local network.
WARNING:tifffile.tifffile:<tifffile.TiffFile '098C1d16_B2_C1_1_00d00h00m.tif'> ImageJ series metadata invalid or corrupted file WARNING:tifffile.tifffile:<tifffile.TiffPages @8> invalid page offset 955524486 WARNING:root:Your tif file is saved a single pagefile. Performance will be affected
ValueError Traceback (most recent call last) Cell In[20], line 5 3 m_orig = cm.load(fnames) 4 downsample_ratio = .2 # motion can be perceived better when downsampling in time ----> 5 m_orig.resize(1, 1, downsample_ratio).play(q_max=99.5, fr=10, magnification=1)
File ~/miniforge3/envs/caiman/lib/python3.11/site-packages/caiman/base/movies.py:1034, in movie.resize(self, fx, fy, fz, interpolation) 1014 def resize(self, fx=1, fy=1, fz=1, interpolation=cv2.INTER_AREA): 1015 """ 1016 Resizing caiman movie into a new one. Note that the temporal 1017 dimension is controlled by fz and fx, fy, fz correspond to (...) 1032 self (caiman movie) 1033 """ -> 1034 T, d1, d2 = self.shape 1035 d = d1 d2 1036 elm = d T
ValueError: not enough values to unpack (expected 3, got 2)
I'm guessing that tiff file is either formatted in a strange way we're not familiar with, or it's damaged.
If you can try copying it to your instance again just to make sure it's entirely there, that'd be a good idea.
If you do that and you still see the problem, how big is it? If it's small enough maybe we can take a look at it here to see what we can learn about its format and how hard it would be to make it work.
You can use tiffit to see the format and convert it to a format that caiman likes. I made it basically for this exact use case. https://github.com/EricThomson/tiffit
@EricThomson Hello! thank you! I tried to use the code but not sure am I missing anything:
1 import tiffit In [32]:
1 tiffit convert c098C2d16_B4_G6_1_00d00h00m.tif new.tiff Cell In[32], line 1 tiffit convert c098C2d16_B4_G6_1_00d00h00m.tif new.tiff ^ SyntaxError: invalid syntax
Hi it's a command line interface not something you use in a script or notebook. So you'd use it from the anaconda prompt for instance. E.g., in the command line in the virtual env where you installed it.
For instance what does it say when you enter:
tiffit info filename.tiff
What info does it return about the file?
I did install the package in the instance. And I tried the code above it shows:
Cell In[11], line 1 tiffit info c046C5d24_B2_G6_1_00d00h00m.tif ^ SyntaxError: invalid syntax
Thank you!
Looks like you are still running it from a notebook not the command line (command line interface meaning your bash shell or whatever you use to enter jupyter notebook
or other textual commands where you created the virtual environment etc). So, once you've activated the virtual environment, but still at command line interface that's when you enter the commands for tiffit. It takes in text commands there in that cli. Not jupyter. Just stay in your bash shell or anaconda prompt or whatever you use for your cli.
You can run things for the os cli in jupyter using the exclamation point too if you want:
!tiffit info filename.tif
I've never tried this but it should work
I see I see thank you!
I finally got what it means and both works on command line and notebook!
Great -- what does it return for the movie that is giving you trouble when you do tiffit info fname.tif
?
Closing seems everything was working, tiff file problem is resolved I hope 😄
Hello!
I wonder if anyone has running caiman under google cloud computing engine? I tried to do that but wasn't able to install caiman manager and import related packages through a virtual environment.
Thank you!