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.

TypeError: 'type' object is not subscriptable

See original GitHub issue

Description

After successfull install following instructions(https://system-bridge.timmo.dev/docs/install), impossible to launch service. python -m systembridgebackend gives error

Traceback (most recent call last):
  File "/home/username/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/username/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/username/anaconda3/lib/python3.8/site-packages/systembridgebackend/__main__.py", line 7, in <module>
    from systembridgeshared.const import SETTING_AUTOSTART, SETTING_LOG_LEVEL
  File "/home/username/anaconda3/lib/python3.8/site-packages/systembridgeshared/const.py", line 3, in <module>
    from systembridgeshared.models.bridge import Bridge
  File "/home/username/anaconda3/lib/python3.8/site-packages/systembridgeshared/models/bridge.py", line 9, in <module>
    class Bridge(BaseModel):
  File "pydantic/main.py", line 188, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/typing.py", line 419, in pydantic.typing.resolve_annotations
    For example:
  File "/home/username/anaconda3/lib/python3.8/typing.py", line 270, in _eval_type
    return t._evaluate(globalns, localns)
  File "/home/username/anaconda3/lib/python3.8/typing.py", line 518, in _evaluate
    eval(self.__forward_code__, globalns, localns),
  File "<string>", line 1, in <module>
TypeError: 'type' object is not subscriptable

What Platform / OS are you running?

Linux

What version are you running?

last

Anything in the logs or a references that might be useful?

No response

Additional information

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JohannCRcommented, Jul 8, 2022

Yes you’re right, a reboot cleared that right up. Thanks

0reactions
timmo001commented, Jul 8, 2022

Well, that database is an SQLite database located in the app data directory specifically for this app. So the only application that should be using this database, would be this one.

Check you don’t have multiple instances of systembridgebackend running

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: 'type' object is not subscriptable when indexing in ...
The type of dict is a type . All types are objects in Python. Thus you are actually trying to index into the...
Read more >
Python TypeError: 'type' object is not subscriptable Solution
The “TypeError: 'type' object is not subscriptable” error is raised when you try to access an object using indexing whose data type is...
Read more >
Typeerror: type object is not subscriptable ( Steps to Fix)
The best way to fix this error is using correct object for indexing. Let's understand with one example. ... The fix is calling...
Read more >
Python TypeError: Object is Not Subscriptable (How to Fix This ...
Python throws the TypeError object is not subscriptable if you use indexing with the square bracket notation on an object that is not...
Read more >
How to fix the typeerror 'type' object is not subscriptable error ...
An object is subscriptable when it contains other items / objects. For example: dictionaries, tuples, lists, sets. Integers, floats and types are not....
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