jwkvam/bowtie

Fails to run on windows, can't run `yarn` commands

Open

#222 创建于 2018年4月3日

在 GitHub 查看
 (12 评论) (0 反应) (0 负责人)Python (760 star) (70 fork)batch import
help wantedwindows

描述

When I run this example code:

from bowtie.visual import Plotly
from bowtie.control import Nouislider
import numpy as np
import plotlywrapper as pw

sine_plot = Plotly()
freq_slider = Nouislider(caption='frequency', minimum=1, maximum=10, start=5)

def listener(freq):
    freq = float(freq[0])
    t = np.linspace(0, 10, 100)
    sine_plot.do_all(pw.line(t, np.sin(freq * t)).dict)

from bowtie import command
@command
def main():
    from bowtie import App
    app = App()
    app.add_sidebar(freq_slider)
    app.add(sine_plot)
    app.subscribe(listener, freq_slider.on_change)
    return app

I receive an error message:

NoSuchOption                              Traceback (most recent call last)
C:\Anaconda3\lib\site-packages\click\parser.py in _process_opts(self, arg, state)
    413         try:
--> 414             self._match_long_opt(norm_long_opt, explicit_value, state)
    415         except NoSuchOption:

C:\Anaconda3\lib\site-packages\click\parser.py in _match_long_opt(self, opt, explicit_value, state)
    323                              if word.startswith(opt)]
--> 324             raise NoSuchOption(opt, possibilities=possibilities)
    325 

NoSuchOption: no such option: -f

During handling of the above exception, another exception occurred:

NoSuchOption                              Traceback (most recent call last)
C:\Anaconda3\lib\site-packages\click\core.py in main(self, args, prog_name, complete_var, standalone_mode, **extra)
    695             try:
--> 696                 with self.make_context(prog_name, args, **extra) as ctx:
    697                     rv = self.invoke(ctx)

C:\Anaconda3\lib\site-packages\click\core.py in make_context(self, info_name, args, parent, **extra)
    620         with ctx.scope(cleanup=False):
--> 621             self.parse_args(ctx, args)
    622         return ctx

C:\Anaconda3\lib\site-packages\click\core.py in parse_args(self, ctx, args)
   1017 
-> 1018         rest = Command.parse_args(self, ctx, args)
   1019         if self.chain:

C:\Anaconda3\lib\site-packages\click\core.py in parse_args(self, ctx, args)
    875         parser = self.make_parser(ctx)
--> 876         opts, args, param_order = parser.parse_args(args=args)
    877 

C:\Anaconda3\lib\site-packages\click\parser.py in parse_args(self, args)
    266         try:
--> 267             self._process_args_for_options(state)
    268             self._process_args_for_args(state)

C:\Anaconda3\lib\site-packages\click\parser.py in _process_args_for_options(self, state)
    292             elif arg[:1] in self._opt_prefixes and arglen > 1:
--> 293                 self._process_opts(arg, state)
    294             elif self.allow_interspersed_args:

C:\Anaconda3\lib\site-packages\click\parser.py in _process_opts(self, arg, state)
    422             if arg[:2] not in self._opt_prefixes:
--> 423                 return self._match_short_opt(arg, state)
    424             if not self.ignore_unknown_options:

C:\Anaconda3\lib\site-packages\click\parser.py in _match_short_opt(self, arg, state)
    366                     continue
--> 367                 raise NoSuchOption(opt)
    368             if option.takes_value:

NoSuchOption: no such option: -f

During handling of the above exception, another exception occurred:

UnsupportedOperation                      Traceback (most recent call last)
<ipython-input-51-d9c40d8b7316> in <module>()
     13 
     14 from bowtie import command
---> 15 @command
     16 def main():
     17     from bowtie import App

C:\Anaconda3\lib\site-packages\bowtie\_command.py in command(func)
    124             arg = ('--help',)
    125         # pylint: disable=too-many-function-args
--> 126         sys.exit(cmd(arg))
    127 
    128     return cmd

C:\Anaconda3\lib\site-packages\click\core.py in __call__(self, *args, **kwargs)
    720     def __call__(self, *args, **kwargs):
    721         """Alias for :meth:`main`."""
--> 722         return self.main(*args, **kwargs)
    723 
    724 

C:\Anaconda3\lib\site-packages\click\core.py in main(self, args, prog_name, complete_var, standalone_mode, **extra)
    705                 if not standalone_mode:
    706                     raise
--> 707                 e.show()
    708                 sys.exit(e.exit_code)
    709             except IOError as e:

C:\Anaconda3\lib\site-packages\click\exceptions.py in show(self, file)
     46             color = self.ctx.color
     47             echo(self.ctx.get_usage() + '\n', file=file, color=color)
---> 48         echo('Error: %s' % self.format_message(), file=file, color=color)
     49 
     50 

C:\Anaconda3\lib\site-packages\click\utils.py in echo(message, file, nl, err, color)
    257 
    258     if message:
--> 259         file.write(message)
    260     file.flush()
    261 

UnsupportedOperation: not writable

贡献者指南

Fails to run on windows, can't run `yarn` commands · jwkvam/bowtie#222 | Good First Issue