Comments (12)
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
from bowtie.
Can you show me the output when you run pip freeze
, you can paste it here if you like. I think you may have an old version of click
but I'm not sure. The fix here is that I should specify a minimum version for it but I never bothered to figure it out. Could you also tell me what command you ran for example:
./app.py build
or
./app.py run
?
I'm using click version 6.7
for example, the tests only run against the latest version. You can try:
pip install -U click
Thanks for the report by the way!
from bowtie.
Ok, I found my mistake, as I had not read the documentation carefully and just tried to run the code off Jupyter Notebook without making the required changes. This time I made recommended changes like so:
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
def main():
from bowtie import App
app = App()
%bowtie app
app.add_sidebar(freq_slider)
app.add(sine_plot)
app.subscribe(listener, freq_slider.on_change)
return app
and ran it and did not get any errors. But when I tried to reach the local host ny using:
http://localhost:9991/
I found this:
This site can’t be reached
localhost refused to connect.
Search Google for localhost 9991
ERR_CONNECTION_REFUSED
I also tried to run the example off command line as well after making sure that I had the correct version of click installed and encountered the below error:
Traceback (most recent call last):
File "app.py", line 15, in <module>
@command
File "C:\Anaconda3\lib\site-packages\bowtie\_command.py", line 126, in command
sys.exit(cmd(arg))
File "C:\Anaconda3\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "C:\Anaconda3\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Anaconda3\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Anaconda3\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\bowtie\_command.py", line 84, in run
_build(app)
File "C:\Anaconda3\lib\site-packages\bowtie\_command.py", line 42, in _build
app._build()
File "C:\Anaconda3\lib\site-packages\bowtie\_app.py", line 875, in _build
if run(['yarn', 'install'], notebook=notebook) > 1:
File "C:\Anaconda3\lib\site-packages\bowtie\_app.py", line 897, in run
return Popen(command, cwd=_DIRECTORY).wait()
File "C:\Anaconda3\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Anaconda3\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
from bowtie.
Can you check if you have yarn installed? Bowtie needs to be able to run yarn
from the command line. The Jupyter integration is still somewhat fragile at this point. The command line interface should be relatively robust.
https://yarnpkg.com/en/docs/install#windows
Maybe I can improve the error messaging here in case people don't have yarn installed.
from bowtie.
-
Though I was sure that I had installed Yarn using:
conda install -c conda-forge yarn
but I reinstalled it and tried to run the file from Jupyter Notebook but did not get any response. -
Then I installed Yarn using .msi (from https://yarnpkg.com/en/docs/install#windows) file and tried to run the code in Jupyter Notebook again. Sill no response.
-
Lastly, I tried to run the file from command line as:
python app3.py run
I again received the same error message as provided in my last comment.
Note that I ran the file on CLI on a different computer this time just to rule out any environmental issues with all new installs of all required elements as prescribed in:
https://bowtie-py.readthedocs.io/en/latest/quickstart.html
from bowtie.
@naveedulislam Hmm, maybe I was mistaken. Can you run yarn
from the command line?
It might be worth noting that I don't have access to a windows machine so I've never tried it myself. As far as I know I don't think bowtie is doing anything that would prohibit usage on windows.
from bowtie.
Since you did not prescribe what I should run for yarn from the command line so I assume that your query for me was to see whether yarn could be run for any command on a windows computer?
I ran the below anaconda command within CMD:
yarn add bowtie
It did run successfully without any unexpected errors:
(C:\Anaconda3) C:\Users\navee\Syncplicity\01-Charter>yarn add bowtie
yarn add v1.5.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 26 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 4.01s.
Then I ran the command:
python app.py run
The rsult:
(C:\Anaconda3) C:\Users\navee\Syncplicity\01-Charter>python app.py run
Traceback (most recent call last):
File "app.py", line 15, in <module>
@command
File "C:\Anaconda3\lib\site-packages\bowtie\_command.py", line 126, in command
sys.exit(cmd(arg))
File "C:\Anaconda3\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "C:\Anaconda3\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Anaconda3\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Anaconda3\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\bowtie\_command.py", line 84, in run
_build(app)
File "C:\Anaconda3\lib\site-packages\bowtie\_command.py", line 42, in _build
app._build()
File "C:\Anaconda3\lib\site-packages\bowtie\_app.py", line 875, in _build
if run(['yarn', 'install'], notebook=notebook) > 1:
File "C:\Anaconda3\lib\site-packages\bowtie\_app.py", line 897, in run
return Popen(command, cwd=_DIRECTORY).wait()
File "C:\Anaconda3\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Anaconda3\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
from bowtie.
I wonder if there is some weird pathing going on. You can run yarn
from the command line but it seems like you can't run it through a python subprocess call? Can you please run this from the command line to confirm this?
python -c "import subprocess; subprocess.Popen(['yarn', '--version'])"
Thank you for trudging through this with me. I wish we had a faster way to debug this. I haven't heard experiences from Windows users before, maybe this tells me that setting up appveyor is worth it.
from bowtie.
I tried and below is the result:
(base) C:\Users\navee>python -c "import subprocess; subprocess.Popen(['yarn', '--version'])"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Anaconda3\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Anaconda3\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
(base) C:\Users\navee>
from bowtie.
Okay problem is confirmed! If we can solve this, then I think everything else will be resolved. I'll think about for this a bit. In the meantime if anyone using Windows reads this, please chime in if you know how to solve this!
from bowtie.
@naveedulislam Can you try some of the "solutions" here. For example:
python -c "import subprocess; subprocess.Popen(['yarn --version'], shell=True)"
from bowtie.
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.
from bowtie.
Related Issues (20)
- latex widget
- more convenient api for sizing rows and columns
- appveyor build
- consider moving to poetry from flit
- ImportError: No module named html HOT 3
- app module gets executed twice when serving app
- use react error boundary to capture exceptions and send to server
- more helpful error when the subscribe arguments are mistakenly swapped
- add helpful messages for yarn and node
- build caching appears to be broken
- use yarn.lock
- test restoring state for all components
- improve margins look and feel and API
- Divs should be able to have children html components
- move example code towards convention of global app HOT 1
- can coverage be improved by tracking multiprocessing code
- flask dance compatibility
- Error building with webpack
- Proposing a PR to fix a few small typos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bowtie.