Skip to main content

Posts

jupyter notebook execution error: "http://localhost:8889/tree?token=xxx" doesn’t understand the “open location” message

I got this error when I tried to launch jupyter notebook on a mac. It is not a fatal error. I could still go to browser directly and copy/paste the url manually. The error indicates that when the command automatically tried to launch a browser, it couldn't find the default browser in jupyter configuration file. The easy fix is to specify the browser. Here are the steps to do so; 1.   Open ~/.jupyter/jupyter_notebook_config.py in an editor.       If the file does not exist then you can create a default config file by typing the following command;       jupyter notebook --generate-config 2. Search for a word "browser" to locate a following line.     #c.NotebookApp.browser = ''     By default it is commented. You can uncomment it and use one of the following values depending on your browser preference.     # set default browser to chrome     c.NotebookApp.browser = 'chrome'     ...

Translucent gray border around mac screen

I noticed that suddenly a translucent gray border appeared around mac screen. It made it difficult to click on window controls and widgets that were behind the border. Luckily, I was able to follow the steps described here  to get rid of it. Step 1. Open a terminal window. Step 2. Type > killall Dock That fixed the problem for me.  

setting ssh identity

I encountered an issue when pushing code from AndroidStudio to github. By default, AndroidStudio picked id_rsa identity file for git operations. However, I had created a different identify file called id_github for my github ssh key. I was able to resolve the problem by creating a ~/.ssh/config file with following content; #github account Host github.com     HostName github.com     User git     IdentityFile ~/.ssh/id_github I was then able to push code to github from AndroidStudio.

node.js and elastic beankstalk

AWS uses Nginx to proxy requests to node application. When you first deploy your app and try to load the site in a browser you may see an error - "502 Bad Gateway". To troubleshoot, you may want to check node.js logs. You could either go to elastic beanstalk dashboard to get a most recent snapshot of logs or ssh to an ec2 instance to view a log file at /var/log/nodejs/nodejs.log . In my case, I was getting an error - "Error: listen EADDRINUSE". I was starting a node server on 8080 but AWS was already running Nginx on the same port. (Note: To lookup ports in use type "sudo netstat -lnptu") . I noticed that a node process was running on port 8081. So I updated my node.js server to listen on port 8081 and that fixed the problem. I could then request the site (just using the dns name, no port required in the url since it is routed automatically to 8081 internally by Nginx). jfyi, when you use "git aws.push" to upload latest code to aws it is...

Firefox 401 - Unauthorized: Access is denied due to invalid credentials

I was getting this error in Firefox when I tried loading our company intranet site. Chrome was able to log me in fine. I found a solution on Mozilla support forum. See the image below for a fix. Set the value to true and then try loading the page again. That fixed the problem for me. Next time I visited the site it prompted me to enter username and password.