I am trying to get the example set up in react-example, but am running into some issues.
When running the example tartiflette app, I get:
>> uvicorn server.asgi:app --reload
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [13587]
Process SpawnProcess-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/uvicorn/main.py", line 304, in run
loop.run_until_complete(self.serve(sockets=sockets))
File "uvloop/loop.pyx", line 1451, in uvloop.loop.Loop.run_until_complete
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/uvicorn/main.py", line 311, in serve
config.load()
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/uvicorn/config.py", line 179, in load
self.loaded_app = import_from_string(self.app)
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/uvicorn/importer.py", line 20, in import_from_string
module = importlib.import_module(module_str)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "./server/asgi.py", line 2, in <module>
from .app import app
File "./server/app.py", line 3, in <module>
from tartiflette_starlette import TartifletteApp
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/tartiflette_starlette/__init__.py", line 1, in <module>
from .app import TartifletteApp
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/tartiflette_starlette/app.py", line 5, in <module>
from .graphql import GraphQLHandler
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/tartiflette_starlette/graphql.py", line 18, in <module>
with open(os.path.join(CURDIR, "graphiql.html")) as tpl_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/csmith/git/react-example/venv/lib/python3.7/site-packages/tartiflette_starlette/graphiql.html'
I add the graphiql.html
file by copying and pasting its contents.
Then I get:
>> uvicorn server.asgi:app --reload
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [13898]
Process SpawnProcess-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/uvicorn/main.py", line 304, in run
loop.run_until_complete(self.serve(sockets=sockets))
File "uvloop/loop.pyx", line 1451, in uvloop.loop.Loop.run_until_complete
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/uvicorn/main.py", line 311, in serve
config.load()
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/uvicorn/config.py", line 179, in load
self.loaded_app = import_from_string(self.app)
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/uvicorn/importer.py", line 20, in import_from_string
module = importlib.import_module(module_str)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "./server/asgi.py", line 5, in <module>
configure(app, settings)
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/bocadillo/config.py", line 102, in configure
plugin(app)
File "/home/csmith/git/react-example/venv/lib/python3.7/site-packages/bocadillo/plugins.py", line 46, in use_providers
app.on("startup", STORE.enter_session)
AttributeError: 'TartifletteApp' object has no attribute 'on'
INFO: Stopping reloader process [13898]
Output of pip freeze:
aiodine==1.2.5
bocadillo==0.15.0
certifi==2019.3.9
cffi==1.12.3
chardet==3.0.4
Click==7.0
h11==0.8.1
httptools==0.0.13
idna==2.8
Jinja2==2.10.1
lark-parser==0.6.4
MarkupSafe==1.1.1
pkg-resources==0.0.0
pycparser==2.19
python-multipart==0.0.5
pytz==2019.1
requests==2.21.0
six==1.12.0
starlette==0.12.0b3
tartiflette==0.8.9
tartiflette-starlette==0.1.0
typesystem==0.2.2
urllib3==1.24.2
uvicorn==0.7.0
uvloop==0.12.2
websockets==7.0
whitenoise==4.1.2
bug