Comments (7)
Full stacktrace:
Error: Page.evaluate: PythonError: Traceback (most recent call last):
File "/lib/python3.10/asyncio/futures.py", line 201, in result
raise self._exception
File "/lib/python3.10/asyncio/tasks.py", line 232, in __step
result = coro.send(None)
File "/lib/python3.10/site-packages/_pyodide/_base.py", line 500, in eval_code_async
await CodeRunner(
File "/lib/python3.10/site-packages/_pyodide/_base.py", line 353, in run_async
await coroutine
File "<exec>", line 8, in <module>
File "/lib/python3.10/site-packages/datasette/app.py", line 39, in <module>
from .views.base import ureg
File "/lib/python3.10/site-packages/datasette/views/base.py", line 11, in <module>
import pint
File "/lib/python3.10/site-packages/pint/__init__.py", line 18, in <module>
from .delegates.formatter._format_helpers import formatter
File "/lib/python3.10/site-packages/pint/delegates/__init__.py", line 12, in <module>
from . import txt_defparser
File "/lib/python3.10/site-packages/pint/delegates/txt_defparser/__init__.py", line 12, in <module>
from .defparser import DefParser
File "/lib/python3.10/site-packages/pint/delegates/txt_defparser/defparser.py", line 9, in <module>
from ..base_defparser import ParserConfig
File "/lib/python3.10/site-packages/pint/delegates/base_defparser.py", line 24, in <module>
from pint.facets.plain.definitions import NotNumeric
File "/lib/python3.10/site-packages/pint/facets/__init__.py", line 72, in <module>
from .context import ContextRegistry, GenericContextRegistry
File "/lib/python3.10/site-packages/pint/facets/context/__init__.py", line 14, in <module>
from .definitions import ContextDefinition
File "/lib/python3.10/site-packages/pint/facets/context/definitions.py", line 19, in <module>
from ..plain import UnitDefinition
File "/lib/python3.10/site-packages/pint/facets/plain/__init__.py", line 13, in <module>
from .definitions import (
File "/lib/python3.10/site-packages/pint/facets/plain/definitions.py", line 19, in <module>
from ..._typing import Magnitude
File "/lib/python3.10/site-packages/pint/_typing.py", line 8, in <module>
from .compat import Never, TypeAlias
File "/lib/python3.10/site-packages/pint/compat.py", line 46, in <module>
from typing_extensions import deprecated # noqa
ImportError: cannot import name 'deprecated' from 'typing_extensions' (/lib/python3.10/site-packages/typing_extensions.py)
from datasette.
Here's the PyOdide test runner: https://github.com/simonw/datasette/blob/main/.github/workflows/test-pyodide.yml
Attempting to replicate in https://pyodide.org/en/stable/console.html failed:
Welcome to the Pyodide 0.26.1 terminal emulator 🐍
Python 3.12.1 (main, Jun 7 2024 22:40:30) on WebAssembly/Emscripten
Type "help", "copyright", "credits" or "license" for more information.
>>> import micropip
>>> await micropip.install("Pint")
>>> import pint
>>>
I was hoping it would raise the same error.
from datasette.
This is the actual test code:
datasette/test-in-pyodide-with-shot-scraper.sh
Lines 21 to 41 in e1bfab3
from datasette.
Running this runs tests locally:
./test-in-pyodide-with-shot-scraper.sh
Got a surprising different error:
::1 - - [11/Jun/2024 09:43:46] "GET / HTTP/1.1" 200 -
Error: PythonError: Traceback (most recent call last):
File "/lib/python3.10/asyncio/futures.py", line 201, in result
raise self._exception
File "/lib/python3.10/asyncio/tasks.py", line 232, in __step
result = coro.send(None)
File "/lib/python3.10/site-packages/_pyodide/_base.py", line 500, in eval_code_async
await CodeRunner(
File "/lib/python3.10/site-packages/_pyodide/_base.py", line 237, in __init__
self.ast = next(self._gen)
File "/lib/python3.10/site-packages/_pyodide/_base.py", line 141, in _parse_and_compile_gen
mod = compile(source, filename, mode, flags | ast.PyCF_ONLY_AST)
File "<exec>", line 2
import micropip
IndentationError: unexpected indent
from datasette.
That error was fixed by doing this:
wheel=$(basename $(ls dist/*.whl) | head -n 1)
from datasette.
... and now I can replicate that CI bug locally.
from datasette.
Fix was to force it to install a modern version of typing-extensions
:
datasette/test-in-pyodide-with-shot-scraper.sh
Lines 36 to 37 in 9a3c3bf
from datasette.
Related Issues (20)
- `Stable` documentation refers to `latest` demo instance
- get_metadata() plugin hook should support async await_me_maybe pattern HOT 2
- Datasette 1.0 rc tracking issue
- Usablity issue with need for root user
- Consider releasing a 0.65 with some forwards compatibility for 1.0 HOT 2
- Bug (in docs?): the "_internal" table on latest.datasette.io doesn't load HOT 1
- Consider adding a new plugin hook: "pre_query" or similar HOT 3
- Proposal - store metadata inside `internal.db` tables HOT 2
- Broken link in documention: fivethirtyeight.datasettes.com
- Fix font size on filter inputs
- base_url getting appended twice in redirects when applying filters? HOT 3
- Accessibility: add a `lang` attribute to `html` HOT 1
- What minimal SQLite version should Datasette support? HOT 9
- Remove upserts in `set_XXX_metadata()` methods
- Canned queries with named parameters fail with error against SQLite 3.46.0 HOT 11
- derive_named_parameters() method that works with latest SQLite HOT 5
- Flaky test_max_csv_mb test HOT 3
- Very weird flaky test_create_table_ignore_replace and test_upsert tests HOT 18
- multiple plugins extending the same base template?
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 datasette.