Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken app #96

Open
Huge opened this issue May 14, 2024 · 1 comment
Open

broken app #96

Huge opened this issue May 14, 2024 · 1 comment

Comments

@Huge
Copy link

Huge commented May 14, 2024

I had my app prototype working fine, served at https://feed_filtering-1-t6768635.deta.app/

Now I was checking it out if it is still alive, but got the module 'orjson' has no attribute 'JSONEncoder'.
In https://deta.space/builder/a09Ng5MgqmYW/develop?tab=overview I see:

[ERROR] AttributeError: module 'orjson' has no attribute 'JSONEncoder'
Traceback (most recent call last):
  File "/var/lang/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/var/task/_entry.py", line 1, in <module>
    from detalib.handler import handle
  File "/opt/python/detalib/handler.py", line 3, in <module>
    from . import handlers
  File "/opt/python/detalib/handlers.py", line 1, in <module>
    from .event import parse_event
  File "/opt/python/detalib/event.py", line 1, in <module>
    from .helpers import json
  File "/opt/python/detalib/helpers.py", line 16, in <module>
    class CustomJSONEncoder(json.JSONEncoder):

Spacefile used:

cat Spacefile
# Spacefile Docs: https://go.deta.dev/docs/spacefile/v0
v: 0
micros:
  - name: feed-filtering
    src: .
    engine: python3.9
    primary: true
    public_routes:
        - "/*"

The app still works locally, although I have upd to python3.11 already.

@lemonyte
Copy link
Contributor

Add a run field to your Spacefile with a command to run your server. This will bypass the deprecated detalib component.
Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants