iPython notebook won't open some files - ipython

I have a git folder with several ipython notebook files in it. I've just got a new comp and installed ipython. When I open some files, it works fine, others, however, display this error:
Error loading notebook, bad request.
The log looks like:
2014-07-16 00:20:11.523 [NotebookApp] WARNING | Unreadable Notebook: /nas-6000/wclab/Ahmed/Notebook/01 - Boundary Layer.ipynb [Errno 5] Input/output error
WARNING:tornado.access:400 GET /api/notebooks/01%20-%20Boundary%20Layer.ipynb?_=1405434011080 (127.0.0.1) 3.00ms referer=linktofile
The read/write and owner permissions are the same for each of the files. The files open fine on my other computers, it's just this new one. Any ideas?
Cheers,
James

Errno 5 is a low level error usually reported when your disk has bad sectors.
I don't think the error is related to the file or ipython, check your disk with an appropriate tool (fsck if you are using Linux).

Related

Why is WSL2 blocking me from editing/saving files on Windows 10 using VsCode?

I've used this setup for months and basically the context is that I messed with my WLS2 which used to work fine. I ended up unninstalling it using "apps and features" on settings, and then installing it again running "wsl --install" on PowerShell there is no more options for unninstalling it using the same "apps and featuress" and now every time I try to save a file I get an error:
Failed to save 'FILE': Unable to write file 'vscode remote://wsl+ubuntu/home/ (No permission (FileSystemError): Error: EACCES: permission denied, open '/home/')
I just want to understand what is happening and why although it worked well before, now it doesn't, and also how do i solve this problem...
One of my trials was running "chmod 777" or something like that (don't understand that really, just copying commands from the internet) but it ran over all my files even outside the WSL enviroment and after a while I just killed the process. It didn't work though, I got the same errors.

Yocto build immediately failed

I have a PC that usually used for Yocto image building. Now I need to add ROS2 packages to the same image. After all it's turned out the disk is full so I've connected a SSD external disk to build the image on it. I did the same steps as before, run the same command etc. but after the build starts if crashed at the first package. I've reinstalled all the sources from zero, I've deleted tmp and ssstate-cache but nothing help. I don't understand what this error says.
This is error trace log
As I see Yocto fail to write something into ssstate-cache/61, I don't really know what that is. A user has read/write permissions.
The build system: Ubuntu 20.04
Yocto version: zeus
In the linked error log, the relevant part is:
SignatureGeneratorOEBasicHash.dump_sigtask(fn='/media/sw/Samsung/yocto/sources/poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb', task='do_fetch', stampbase='/media/sw/Samsung/yocto/build-xwayland/sstate-cache/61/sstate:texinfo-dummy-native::1.0:r0::3:610ed4b8e8bf78bbcd4a667b6645a0276f5c8bfce5de4822923850d44d032bbe_fetch.tgz.siginfo', runtime='customfile:/media/sw/Samsung/yocto/build-xwayland/tmp/stamps/x86_64-linux/texinfo-dummy-native/1.0-r0'):
os.chmod(tmpfile, 0o664)
> os.rename(tmpfile, sigfile)
except (OSError, IOError) as err:
OSError: [Errno 22] Invalid argument: '/media/sw/Samsung/yocto/build-xwayland/sstate-cache/61/sigtask.twkjztl9' -> '/media/sw/Samsung/yocto/build-xwayland/sstate-cache/61/sstate:texinfo-dummy-native::1.0:r0::3:610ed4b8e8bf78bbcd4a667b6645a0276f5c8bfce5de4822923850d44d032bbe_fetch.tgz.siginfo'
It is likely that the new name is not valid for the target disk filesystem. Typically the : character is invalid on FAT/NTFS filesystems. Native Linux filesystems like Ext4, XFS and Btrfs will not have this limitation.

Error While Running Kafka Server on Windows

while running kafka on windows.
C:\Program Files\kafka_2.12-2.1.0>.\bin\windows\kafka-server-start.bat .\config\server.properties
And getting the error
The system cannot find the path specified.
The syntax of the command is incorrect.
Error: Could not find or load main class Files\kafka_2.12-2.1.0.logs
You cannot have spaces in the file path, e.g Program Files
There's no specific reason Kafka needs to be in your Program Files folder. You could move it to C:\kafka for example, and I've been able to run it on Windows 10 (out of my users folder), so it does work

Using profiles with ipython/jupyter

Here is help output from ipython:
Examples
ipython notebook # start the notebook
ipython notebook --profile=sympy # use the sympy profile
ipython notebook --certfile=mycert.pem # use SSL/TLS certificate
Seems straightforward .. but then when invoking
$ipython notebook --profile=pyspark
The following warning occurs:
[W 20:54:38.623 NotebookApp] Unrecognized alias: '--profile=pyspark',
it will probably have no effect.
So then the online help is inconsistent with the warning message.
What is the correct way to activate the profile?
Update I tried reversing the order as follows:
$ipython --profile=pyspark notebook
But then a different warning occurs:
[TerminalIPythonApp] WARNING | File not found: u'notebook
The option is for the ipython binary, but you are trying to pass the option to the notebook application, as evident from the warning, which is from NotebookApp:
[W 20:54:38.623 NotebookApp] Unrecognized alias: '--profile=pyspark',
it will probably have no effect.
That's basically saying you are passing an option to notebook which it doesn't recognize, so it won't have any effect.
You need to pass the option to ipython:
ipython --profile=foo -- notebook
Online docs are inaccurate. The order needs to be reversed - with the -- option before notebook:
$ipython --profile=pyspark notebook
But .. the issues go beyond that even ..
It seems that jupyter (newer version of ipython) may not respect ipython profiles at all.
There are multiple references to same. Here is one from the Spark mailing list
Does anyone have a pointer to Jupyter configuration with pyspark? The
current material on python inotebook is out of date, and jupyter
ignores ipython profiles.

rsync 3.0.9 on source HFS+ destination centos

My source is an old external hard drive formatted HFS+ (used to be data from server running 10.4.11) connected to an iMac running 10.8.5 with an upgraded version of rsync 3.0.9.
The destination is a Centos 6.4 server running rsync 3.0.9 as well.
We have tried to transfer a FONTS folder (Source size = 4.7GB) to the destination but the size of the folder is not kept (Destination size = 655MB).
Below is the command that I run to preserve hard links - ACLs.....
/usr/local/bin/rsync -aHpEXotg --devices --specials --ignore-errors /Users/london/Desktop/FONTS root#192.168.200.253:/home/TEST
Also getting errors: rsync: rsync_xal_set: lsetxattr(""/home/TEST/FONTS/ Folder/Kfz-EURO Schrift MAC+PC/MAC/FE Mittelschrift.image"","user.com.apple.FinderInfo") failed: Operation not supported (95)
Most of the files are showing as Unix files and can't be open.
This issue has been time consuming so if someone can guide me.
Thanks..
Ran across this today as I encountered similar errors. I ended up running rsync with minimum options to complete the copy:
rsync -r --progress /path/to/source /path/to/destination
-r is recursive
--progress shows additional copy info (versus v for verbose output)
If you leave out --progress, rsync will only show you files that error and will transfer the rest - that can be useful to know which files you're not getting if there aren't very many with errors. Course, alternatively if there are a lot of errors, that can indicate bad sectors on the drive.