Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watermark is broken #40

Open
matt-long opened this issue May 11, 2020 · 0 comments
Open

watermark is broken #40

matt-long opened this issue May 11, 2020 · 0 comments

Comments

@matt-long
Copy link
Contributor

matt-long commented May 11, 2020

Something in utils.py breaks watermark. I get the following error from the watermark magic.

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-173-35b364ad726b> in <module>
     12 
     13 get_ipython().run_line_magic('load_ext', 'watermark')
---> 14 get_ipython().run_line_magic('watermark', '-d -iv -m -g -h')

/glade/work/mclong/miniconda3/envs/cesm2-marbl/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
   2305                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2306             with self.builtin_trap:
-> 2307                 result = fn(*args, **kwargs)
   2308             return result
   2309 

</glade/work/mclong/miniconda3/envs/cesm2-marbl/lib/python3.7/site-packages/decorator.py:decorator-gen-126> in watermark(self, line)

/glade/work/mclong/miniconda3/envs/cesm2-marbl/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
    185     # but it's overkill for just that one bit of state.
    186     def magic_deco(arg):
--> 187         call = lambda f, *a, **k: f(*a, **k)
    188 
    189         if callable(arg):

/glade/work/mclong/miniconda3/envs/cesm2-marbl/lib/python3.7/site-packages/watermark/watermark.py in watermark(self, line)
    134                 self._get_git_branch(bool(args.machine))
    135             if args.iversions:
--> 136                 self._print_all_import_versions(self.shell.user_ns)
    137             if args.watermark:
    138                 if self.out:

/glade/work/mclong/miniconda3/envs/cesm2-marbl/lib/python3.7/site-packages/watermark/watermark.py in _print_all_import_versions(vars)
    248         longest = max([len(i[0]) for i in to_print] + [0]) + 1
    249         for entry in to_print:
--> 250             print(('%s' % entry[0]).ljust(longest) + entry[1])
    251 
    252 

TypeError: can only concatenate str (not "NoneType") to str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant