question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SabarishVTcommented, Apr 7, 2020
if notebook is None:
            return Popen(command,shell=True, cwd=self._build_dir).wait()
        cmd = Popen(command,shell=True, cwd=self._build_dir, stdout=PIPE, stderr=STDOUT)

I was able to overcome the issue with subprocess.Popen error by modifying the above line of codes in bowtie _app.py

0reactions
naveedulislamcommented, Apr 9, 2018

I show the below message:

(C:\Anaconda3) C:\Users\navee>python -c "import subprocess; subprocess.Popen(['yarn --version'], shell=True)"
'"yarn --version"' is not recognized as an internal or external command,
operable program or batch file.

I even tried reinstalling everything and then tried the above command again but no change.

Also tried several differnt options provided in the refrerred post and others but no encouraging output.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Unable to Run Yarn in Windows Terminal - PowerShell
To fix it, open PowerShell as administrator, again make sure to run this in PowerShell, not with the regular command prompt (cmd).
Read more >
yarn command doesn't work on Windows 10: Here's a fix. #21
Yarn fails with an MSBuild error: MSB4132. It is looking for v2.0 of the build tools but only v4.0 is found. To solve...
Read more >
Yarn is installed but does not work. Command is recognized ...
npm install - Yarn is installed but does not work. Command is recognized but no yarn commands do anything. Windows Powershell - Stack...
Read more >
'Yarn' is not recognized as an internal or external command
If you get the error "yarn.ps1 cannot be loaded because running scripts is disabled on this system", open your PowerShell as an administrator...
Read more >
Fix Unable to Run Yarn in Windows Terminal – PowerShell
If you run into an error with your brand new machine when trying to run any custom scripts like npm, yarn or any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found