jupyter-drive
jupyter-drive copied to clipboard
MacBook Pro Installation Error
I've tried following the install instructions on two different laptops and have run into the same error each time.
First of all the Readme has a git command that doesn't work for me:
$ git clone git+git://github.com/jupyter/jupyter-drive.git
Cloning into 'jupyter-drive'...
fatal: Unable to find remote helper for 'git+git'
But I changed it so that it worked:
$ git clone git://github.com/jupyter/jupyter-drive.git
Cloning into 'jupyter-drive'...
remote: Counting objects: 858, done.
remote: Total 858 (delta 0), reused 0 (delta 0), pack-reused 858
Receiving objects: 100% (858/858), 388.24 KiB | 0 bytes/s, done.
Resolving deltas: 100% (463/463), done.
Checking connectivity... done.
pip installing seems to work:
$ pip install -e jupyter-drive
Obtaining file:///Users/jonathan/github/jupyter-drive
Requirement already satisfied (use --upgrade to upgrade): IPython in /Users/jonathan/anaconda/lib/python2.7/site-packages (from jupyterdrive==1.1.0)
Installing collected packages: jupyterdrive
Running setup.py develop for jupyterdrive
Successfully installed jupyterdrive
This is the step that has the problems:
$ python -m jupyterdrive -v
No handlers could be found for logger "jupyterdrive"
Traceback (most recent call last):
File "/Users/jonathan/anaconda/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/jonathan/anaconda/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/jonathan/github/jupyter-drive/jupyterdrive/__main__.py", line 2, in <module>
jupyterdrive.main()
File "/Users/jonathan/github/jupyter-drive/jupyterdrive/__init__.py", line 158, in main
verbose=args.verbose
File "/Users/jonathan/github/jupyter-drive/jupyterdrive/__init__.py", line 52, in install
activate(profile, mixed=mixed)
File "/Users/jonathan/github/jupyter-drive/jupyterdrive/__init__.py", line 91, in activate
with jconfig(profile) as config:
File "/Users/jonathan/github/jupyter-drive/jupyterdrive/__init__.py", line 70, in __enter__
self.pdir = locate_profile(self.profile)
File "/Users/jonathan/anaconda/lib/python2.7/site-packages/IPython/utils/path.py", line 357, in locate_profile
pd = ProfileDir.find_profile_dir_by_name(get_ipython_dir(), profile)
File "/Users/jonathan/anaconda/lib/python2.7/site-packages/IPython/core/profiledir.py", line 225, in find_profile_dir_by_name
dirname = u'profile_' + name
TypeError: coercing to Unicode: need string or buffer, NoneType found
I've also run this giving it an IPython profile as well with the same error.
I'm running on a Mac Book Pro with the following information:
$ ipython
Python 2.7.9 |Anaconda 2.1.0 (x86_64)| (default, Dec 15 2014, 10:37:34)
Type "copyright", "credits" or "license" for more information.
IPython 3.1.0 -- An enhanced Interactive Python.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
Hi thanks for the report, and sorry for the delay to respond, the git+git is probably a typo, I'll fix it.
I'm trying to make this working with both IPython 3.x and 4.x, so their might be some inconsistencies.
I ran mixed mode on my MacBook Pro with "python -m jupyterdrive --mixed" and it gave the same error and stack trace. I'm running python 2.7.9 installed by homebrew.
Can you both pull and retry ? I don't get why it was passing on my machine, but found where it was wrong.
On Tue, Apr 28, 2015 at 6:05 AM, Greg Houston [email protected] wrote:
I ran mixed mode on my MacBook Pro with "python -m jupyterdrive --mixed" and it gave the same error and stack trace. I'm running python 2.7.9 installed by homebrew.
— Reply to this email directly or view it on GitHub https://github.com/jupyter/jupyter-drive/issues/106#issuecomment-97054036 .
i've pulled the latest and retried. The same error appeared.
In the debugger I can see that name is None at IPython/core/profiledir.py(225). Looking up the stack I see that name comes from self.profile in jupyterdrive/init.py(70) but self.profile is None.
> /Users/greg/Documents/dev/python/jupyter/jupyter-drive/jupyterdrive/__init__.py(70)__enter__()
69 else:
---> 70 self.pdir = locate_profile(self.profile)
71 self.cff_name = 'ipython_notebook_config.json'
ipdb> l
65 def __enter__(self):
66 if JUPYTER:
67 self.pdir = jupyter_config_dir()
68 self.cff_name = 'jupyter_notebook_config.json'
69 else:
---> 70 self.pdir = locate_profile(self.profile)
71 self.cff_name = 'ipython_notebook_config.json'
72
73 jc = JSONFileConfigLoader(self.cff_name, self.pdir)
74
75 try:
ipdb> print self
<jupyterdrive.jconfig object at 0x10b5ee350>
ipdb> print self.profile
None
further up the stack I see the profile is set by the prefix argument to main, and it defaults to None...
127 def main(argv=None):
128 import argparse
129 prog = '{} -m jupyterdrive'.format(os.path.basename(sys.executable))
130 parser = argparse.ArgumentParser(prog=prog,
131 description='Install Google Drive integration for Jupyter.')
132 parser.add_argument("-m", "--mixed", help="Installed the mixed content manager",
133 action="store_true")
134 parser.add_argument('profile', nargs='?', default=None, metavar=('<profile_name>'), help='profile name in which to install google drive integration for IPython 3.x')
135
136 parser.add_argument("-S", "--no-symlink", help="do not symlink at install time",
137 action="store_false", dest='symlink', default=True)
138 parser.add_argument("-u", "--user", help="force install in user land",
139 action="store_true")
140 parser.add_argument("-p", "--prefix", help="Prefix where to install extension",
141 action='store', default=None)
142 parser.add_argument("-P", "--path", help="explicit path on where to install the extension",
143 action='store', default=None)
144 parser.add_argument("-v", "--verbose", help="increase verbosity",
145 action='store_true')
146 parser.add_argument("--deactivate", help='deactivate', action='store_true')
147 args = parser.parse_args(argv)
148
149 if args.deactivate:
150 deactivate()
151 else:
152 install( path=args.path,
153 mixed=args.mixed,
154 user=args.user,
155 prefix=args.prefix,
156 profile=args.prefix,
157 symlink=args.symlink,
--> 158 verbose=args.verbose
159 )
ipdb> print args.prefix
None
So I was able to get past the error by providing the prefix argument on the command line. Which for me was good since I'm using a profile named "gpa".
> python -m jupyterdrive --mixed -p gpa -v
I'm stupid, I pushed on my fork instead of this. Can you retry ?
On Tue, Apr 28, 2015 at 12:43 PM, Greg Houston [email protected] wrote:
i've pulled the latest and retried. The same error appeared.
In the debugger I can see that name is None at IPython/core/profiledir.py(225). Looking up the stack I see that name comes from self.profile in jupyterdrive/init.py(70) but self.profile is None.
/Users/greg/Documents/dev/python/jupyter/jupyter-drive/jupyterdrive/init.py(70)enter() 69 else: ---> 70 self.pdir = locate_profile(self.profile) 71 self.cff_name = 'ipython_notebook_config.json'
ipdb> l 65 def enter(self): 66 if JUPYTER: 67 self.pdir = jupyter_config_dir() 68 self.cff_name = 'jupyter_notebook_config.json' 69 else: ---> 70 self.pdir = locate_profile(self.profile) 71 self.cff_name = 'ipython_notebook_config.json' 72 73 jc = JSONFileConfigLoader(self.cff_name, self.pdir) 74 75 try:
ipdb> print self <jupyterdrive.jconfig object at 0x10b5ee350> ipdb> print self.profile None
further up the stack I see the profile is set by the prefix argument to main, and it defaults to None...
127 def main(argv=None): 128 import argparse 129 prog = '{} -m jupyterdrive'.format(os.path.basename(sys.executable)) 130 parser = argparse.ArgumentParser(prog=prog, 131 description='Install Google Drive integration for Jupyter.') 132 parser.add_argument("-m", "--mixed", help="Installed the mixed content manager", 133 action="store_true") 134 parser.add_argument('profile', nargs='?', default=None, metavar=('<profile_name>'), help='profile name in which to install google drive integration for IPython 3.x') 135 136 parser.add_argument("-S", "--no-symlink", help="do not symlink at install time", 137 action="store_false", dest='symlink', default=True) 138 parser.add_argument("-u", "--user", help="force install in user land", 139 action="store_true") 140 parser.add_argument("-p", "--prefix", help="Prefix where to install extension", 141 action='store', default=None) 142 parser.add_argument("-P", "--path", help="explicit path on where to install the extension", 143 action='store', default=None) 144 parser.add_argument("-v", "--verbose", help="increase verbosity", 145 action='store_true') 146 parser.add_argument("--deactivate", help='deactivate', action='store_true') 147 args = parser.parse_args(argv) 148 149 if args.deactivate: 150 deactivate() 151 else: 152 install( path=args.path, 153 mixed=args.mixed, 154 user=args.user, 155 prefix=args.prefix, 156 profile=args.prefix, 157 symlink=args.symlink,
--> 158 verbose=args.verbose 159 )
ipdb> print args.prefix None
So I was able to get past the error by providing the prefix argument on the command line. Which for me was good since I'm using a profile named "gpa".
python -m jupyterdrive --mixed -p gpa -v
— Reply to this email directly or view it on GitHub https://github.com/jupyter/jupyter-drive/issues/106#issuecomment-97182723 .