Forums

When creating new Jupyter notebook, error of loading the format

I tried to creat the new jupyter notebook, it worked well before, but I suddenly cannot do that. It says it can only load the .ipynb with format v4 or earlier. Can anybody help me?

Thanks a lot!

An unknown error occurred while loading this notebook. This version can load notebook formats v4 or earlier. See the server log for details. Full error message

Does this only happen when trying to create new notebooks? Can you still view existing ones?

Have you got an example new notebook file we could look at, or does it not even manage to create them?

@harry It happens to both new created and existing notebooks. I have created a notebook named Test. Is there anyway I can provide it here? Thanks!

yes, if you click the little "download" icon next to it, that'll take you to the raw json of the notebook. paste it here and we can take a copy to try and open in our own environment.

Thanks a lot. Please see below.

{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "twitter_user = pd.read_csv('user.csv', \n",
    "                           names=(\"id\",\"name\",\"created_at\",\"location\",\"followers_count\",\"favourites_count\",\"friends_count\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "tweets = pd.read_csv('tweets.csv', \n",
    "                    names=(\"id\",\"userid\", \"time\", \"tweet\",\"geo\",\"source\",\"retweet_count\",\"retweeted\",\"favorite_count\",\"favorited\",\"in_reply_to_userid\", \"hashtag\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "tweets.head(3000000).to_csv(\"tweets_1.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2.7",
   "language": "python",
   "name": "python2.7"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}

That notebook works fine. Perhaps there's something else you haven't included in your description like whether you've installed a version of ipython into a virtualenv that you;re using or to your home directory or something like that.

Hi there, can you take another look now and see if anything has changed?

Thanks, @harry! It works well now!

I have same problem!

Hi there- what is the exact error that you are seeing? and are you trying to open a notebook uploaded from somewhere else?

HI all, I clicked "add new" to get a new "notebook" but I al always getting the below:

The web page at https://notebooks-2.pythonanywhere.com:8887/user/gserra75/session/vubfagyckg6jn71aw5jd3iwab2ri2qzg/notebook_path/Notebook2.ipynb might be temporarily down or it may have moved permanently to a new web address.

Am I doing something wrong?

That looks like something in your local environment (firewall, network rule, anti-virus etc.) is blocking access to port 8887, which is necessary for notebooks to work.