Git Product home page Git Product logo

Comments (24)

zapashcanon avatar zapashcanon commented on June 24, 2024 1

@MRAAGH thanks, I believed the two errors where unrelated, thanks. No, I'm just using unstable and the bug pointed by @jonassmedegaard is the one responsible for it. Thanks. :)

from mirage.

DrRac27 avatar DrRac27 commented on June 24, 2024

Seems like a rebuild of mirage is needed. If that fixes it for you please report it to the maintainer of the AUR package so they can increase the pkgrel

from mirage.

DrRac27 avatar DrRac27 commented on June 24, 2024

I just did a pacman -Syu, libffi got upgraded and mirage still runs fine. So the problem should not be related to mirage. Did you do something like a partial update (which is not allowed on Arch)? A full system update might fix the problem for you

from mirage.

proudmuslim-dev avatar proudmuslim-dev commented on June 24, 2024

I've already attempted to rebuild Mirage, did it again just now and the error is persisting

from mirage.

jonassmedegaard avatar jonassmedegaard commented on June 24, 2024

@proudmuslim-dev I think you are missing the point in latest post by @DrRac27: Some dependency of Mirage (not Mirage itself) might need recompiling.

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

I have the same error on debian, building from source or with the official package:

From source:

~ 18:20:27 | Got library name:  "/usr/lib/x86_64-linux-gnu/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
~ 18:20:28 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/home/zapashcanon/dev/py/mirage/src/backend/qml_bridge.py\", line 28, in <module>\n    from .pyotherside_events import CoroutineDone, LoopException\n\n  File \"/home/zapashcanon/dev/py/mirage/src/backend/pyotherside_events.py\", line 10, in <module>\n    from .utils import serialize_value_for_qml\n\n  File \"/home/zapashcanon/dev/py/mirage/src/backend/utils.py\", line 32, in <module>\n    from nio.crypto import AsyncDataT as File\n\n  File \"/home/zapashcanon/.local/lib/python3.9/site-packages/nio/__init__.py\", line 2, in <module>\n    from .client import *\n\n  File \"/home/zapashcanon/.local/lib/python3.9/site-packages/nio/client/__init__.py\", line 6, in <module>\n    from .async_client import AsyncClient, AsyncClientConfig, DataProvider\n\n  File \"/home/zapashcanon/.local/lib/python3.9/site-packages/nio/client/async_client.py\", line 47, in <module>\n    from aiohttp import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/__init__.py\", line 6, in <module>\n    from .client import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/client.py\", line 35, in <module>\n    from . import hdrs, http, payload\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/http.py\", line 7, in <module>\n    from .http_parser import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/http_parser.py\", line 15, in <module>\n    from .helpers import NO_EXTENSIONS, BaseTimerContext\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/helpers.py\", line 667, in <module>\n    class CeilTimeout(async_timeout.timeout):\n\nTypeError: function() argument 'code' must be code, not str\n"
! 18:20:28 | Unhandled PyOtherSide error: Cannot import module: backend.qml_bridge (Traceback (most recent call last):

  File "/home/zapashcanon/dev/py/mirage/src/backend/qml_bridge.py", line 28, in <module>
    from .pyotherside_events import CoroutineDone, LoopException

  File "/home/zapashcanon/dev/py/mirage/src/backend/pyotherside_events.py", line 10, in <module>
    from .utils import serialize_value_for_qml

  File "/home/zapashcanon/dev/py/mirage/src/backend/utils.py", line 32, in <module>
    from nio.crypto import AsyncDataT as File

  File "/home/zapashcanon/.local/lib/python3.9/site-packages/nio/__init__.py", line 2, in <module>
    from .client import *

  File "/home/zapashcanon/.local/lib/python3.9/site-packages/nio/client/__init__.py", line 6, in <module>
    from .async_client import AsyncClient, AsyncClientConfig, DataProvider

  File "/home/zapashcanon/.local/lib/python3.9/site-packages/nio/client/async_client.py", line 47, in <module>
    from aiohttp import (

  File "/usr/lib/python3/dist-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import (

  File "/usr/lib/python3/dist-packages/aiohttp/client.py", line 35, in <module>
    from . import hdrs, http, payload

  File "/usr/lib/python3/dist-packages/aiohttp/http.py", line 7, in <module>
    from .http_parser import (

  File "/usr/lib/python3/dist-packages/aiohttp/http_parser.py", line 15, in <module>
    from .helpers import NO_EXTENSIONS, BaseTimerContext

  File "/usr/lib/python3/dist-packages/aiohttp/helpers.py", line 667, in <module>
    class CeilTimeout(async_timeout.timeout):

TypeError: function() argument 'code' must be code, not str
)
~ 18:20:28 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'BRIDGE' is not defined\n"
! 18:20:28 | Unhandled PyOtherSide error: Function not found: 'BRIDGE.call_backend_coro' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'BRIDGE' is not defined

Official package:

matrix-mirage
~ 18:21:35 | Got library name:  "/usr/lib/x86_64-linux-gnu/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
~ 18:21:36 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"qrc:/src/backend/qml_bridge.py\", line 28, in <module>\n    from .pyotherside_events import CoroutineDone, LoopException\n\n  File \"qrc:/src/backend/pyotherside_events.py\", line 10, in <module>\n    from .utils import serialize_value_for_qml\n\n  File \"qrc:/src/backend/utils.py\", line 32, in <module>\n    from nio.crypto import AsyncDataT as File\n\n  File \"/home/zapashcanon/.local/lib/python3.9/site-packages/nio/__init__.py\", line 2, in <module>\n    from .client import *\n\n  File \"/home/zapashcanon/.local/lib/python3.9/site-packages/nio/client/__init__.py\", line 6, in <module>\n    from .async_client import AsyncClient, AsyncClientConfig, DataProvider\n\n  File \"/home/zapashcanon/.local/lib/python3.9/site-packages/nio/client/async_client.py\", line 47, in <module>\n    from aiohttp import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/__init__.py\", line 6, in <module>\n    from .client import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/client.py\", line 35, in <module>\n    from . import hdrs, http, payload\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/http.py\", line 7, in <module>\n    from .http_parser import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/http_parser.py\", line 15, in <module>\n    from .helpers import NO_EXTENSIONS, BaseTimerContext\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/helpers.py\", line 667, in <module>\n    class CeilTimeout(async_timeout.timeout):\n\nTypeError: function() argument 'code' must be code, not str\n"
! 18:21:36 | Unhandled PyOtherSide error: Cannot import module: backend.qml_bridge (Traceback (most recent call last):

  File "qrc:/src/backend/qml_bridge.py", line 28, in <module>
    from .pyotherside_events import CoroutineDone, LoopException

  File "qrc:/src/backend/pyotherside_events.py", line 10, in <module>
    from .utils import serialize_value_for_qml

  File "qrc:/src/backend/utils.py", line 32, in <module>
    from nio.crypto import AsyncDataT as File

  File "/home/zapashcanon/.local/lib/python3.9/site-packages/nio/__init__.py", line 2, in <module>
    from .client import *

  File "/home/zapashcanon/.local/lib/python3.9/site-packages/nio/client/__init__.py", line 6, in <module>
    from .async_client import AsyncClient, AsyncClientConfig, DataProvider

  File "/home/zapashcanon/.local/lib/python3.9/site-packages/nio/client/async_client.py", line 47, in <module>
    from aiohttp import (

  File "/usr/lib/python3/dist-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import (

  File "/usr/lib/python3/dist-packages/aiohttp/client.py", line 35, in <module>
    from . import hdrs, http, payload

  File "/usr/lib/python3/dist-packages/aiohttp/http.py", line 7, in <module>
    from .http_parser import (

  File "/usr/lib/python3/dist-packages/aiohttp/http_parser.py", line 15, in <module>
    from .helpers import NO_EXTENSIONS, BaseTimerContext

  File "/usr/lib/python3/dist-packages/aiohttp/helpers.py", line 667, in <module>
    class CeilTimeout(async_timeout.timeout):

TypeError: function() argument 'code' must be code, not str
)
~ 18:21:36 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'BRIDGE' is not defined\n"
! 18:21:36 | Unhandled PyOtherSide error: Function not found: 'BRIDGE.call_backend_coro' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'BRIDGE' is not defined

from mirage.

jonassmedegaard avatar jonassmedegaard commented on June 24, 2024

I have the same error on debian, building from source or with the official package:

Probably helpful if you can share if you mean Debian stable (bullseye), testing (bookworm), or unstable (sid), and which exact version of the official package.

from mirage.

jonassmedegaard avatar jonassmedegaard commented on June 24, 2024

Also (depending on what exactly you are doing) it might help to ensure all build-dependencies for the package is installed - e.g. using apt build-dep matrix-mirage.

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

I'm on debian unstable, version 0.7.2~dfsg+~hsluv1.0.0+~1.0.0-3

from mirage.

jonassmedegaard avatar jonassmedegaard commented on June 24, 2024

@zapashcanon did you see my follow-up post?

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

Sorry.

After installing build deps, I keep having the exact same error with both methods (mirage package from Debian and mirage built from source). (And I don't see why it would have changed something ?)

from mirage.

jonassmedegaard avatar jonassmedegaard commented on June 24, 2024

If some libraries were missing then that would affect the build - I am not sure how such failure would look like, so I simply suggested to make sure it was all there.

It seems your build uses a mixture of system-provided libraries and libraries below /home/zapashcanon/.local/lib/python3.9/site-packages/ - perhaps those local libraries are incompatible? and cause the build failure?

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

There's no build failure, it's a runtime error: it fails when I start mirage. If I delete everything in ~/.local/lib/python3.9 and use mirage from the debian package, it fails in the same way:

rm -rf ~/.local/lib/python3.9
matrix-mirage
~ 13:42:52 | Got library name:  "/usr/lib/x86_64-linux-gnu/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
~ 13:42:53 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"qrc:/src/backend/qml_bridge.py\", line 28, in <module>\n    from .pyotherside_events import CoroutineDone, LoopException\n\n  File \"qrc:/src/backend/pyotherside_events.py\", line 10, in <module>\n    from .utils import serialize_value_for_qml\n\n  File \"qrc:/src/backend/utils.py\", line 32, in <module>\n    from nio.crypto import AsyncDataT as File\n\n  File \"/usr/lib/python3/dist-packages/nio/__init__.py\", line 2, in <module>\n    from .client import *\n\n  File \"/usr/lib/python3/dist-packages/nio/client/__init__.py\", line 6, in <module>\n    from .async_client import AsyncClient, AsyncClientConfig, DataProvider\n\n  File \"/usr/lib/python3/dist-packages/nio/client/async_client.py\", line 47, in <module>\n    from aiohttp import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/__init__.py\", line 6, in <module>\n    from .client import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/client.py\", line 35, in <module>\n    from . import hdrs, http, payload\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/http.py\", line 7, in <module>\n    from .http_parser import (\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/http_parser.py\", line 15, in <module>\n    from .helpers import NO_EXTENSIONS, BaseTimerContext\n\n  File \"/usr/lib/python3/dist-packages/aiohttp/helpers.py\", line 667, in <module>\n    class CeilTimeout(async_timeout.timeout):\n\nTypeError: function() argument 'code' must be code, not str\n"
! 13:42:53 | Unhandled PyOtherSide error: Cannot import module: backend.qml_bridge (Traceback (most recent call last):

  File "qrc:/src/backend/qml_bridge.py", line 28, in <module>
    from .pyotherside_events import CoroutineDone, LoopException

  File "qrc:/src/backend/pyotherside_events.py", line 10, in <module>
    from .utils import serialize_value_for_qml

  File "qrc:/src/backend/utils.py", line 32, in <module>
    from nio.crypto import AsyncDataT as File

  File "/usr/lib/python3/dist-packages/nio/__init__.py", line 2, in <module>
    from .client import *

  File "/usr/lib/python3/dist-packages/nio/client/__init__.py", line 6, in <module>
    from .async_client import AsyncClient, AsyncClientConfig, DataProvider

  File "/usr/lib/python3/dist-packages/nio/client/async_client.py", line 47, in <module>
    from aiohttp import (

  File "/usr/lib/python3/dist-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import (

  File "/usr/lib/python3/dist-packages/aiohttp/client.py", line 35, in <module>
    from . import hdrs, http, payload

  File "/usr/lib/python3/dist-packages/aiohttp/http.py", line 7, in <module>
    from .http_parser import (

  File "/usr/lib/python3/dist-packages/aiohttp/http_parser.py", line 15, in <module>
    from .helpers import NO_EXTENSIONS, BaseTimerContext

  File "/usr/lib/python3/dist-packages/aiohttp/helpers.py", line 667, in <module>
    class CeilTimeout(async_timeout.timeout):

TypeError: function() argument 'code' must be code, not str
)
~ 13:42:53 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'BRIDGE' is not defined\n"
! 13:42:53 | Unhandled PyOtherSide error: Function not found: 'BRIDGE.call_backend_coro' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'BRIDGE' is not defined
)

from mirage.

jonassmedegaard avatar jonassmedegaard commented on June 24, 2024

Ah, I misunderstood the nature of the issue. My points remain, though - the mixture og Qt and Python means that some of the same kinds of issues may occur either at build time or at runtime.

Sorry, I cannot help more here.

If this issue occurs using no custom-downloaded or custom-built code, only using the official Debian package, then please report that as an issue in Debian using the command-line tool reportbug.

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

As I said, the same issue arise when using only the official debian package, see my last paste which makes no mention of ~/.local/lib/python3.9, but as it happens too with mirage built from source, I believe it comes from mirage (or one of its dependency).

from mirage.

jonassmedegaard avatar jonassmedegaard commented on June 24, 2024

You don't need to report it with Debian if you don't want to.

I use the Debian package (and maintain it as well) and I cannot reproduce the issue reported here. In case that's any help to you and/or to the upstream developers.

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

I don't understand why but, upgrading to the latest debian package (0.7.2~dfsg+~hsluv1.0.0+~1.0.0-4) fixed the issue...

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

The issue came back and persists since a month. :/

from mirage.

MRAAGH avatar MRAAGH commented on June 24, 2024

Is the error the same?

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

The second half of it yes :

$ matrix-mirage
~ 15:26:33 | Got library name:  "/usr/lib/x86_64-linux-gnu/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
~ 15:26:34 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"qrc:/src/backend/qml_bridge.py\", line 181, in <module>\n    BRIDGE = QMLBridge()\n\n  File \"qrc:/src/backend/qml_bridge.py\", line 52, in __init__\n    from .backend import Backend\n\n  File \"qrc:/src/backend/backend.py\", line 24, in <module>\n    from .matrix_client import MatrixClient\n\n  File \"qrc:/src/backend/matrix_client.py\", line 42, in <module>\n    from .html_markdown import HTML_PROCESSOR as HTML\n\n  File \"qrc:/src/backend/html_markdown.py\", line 21, in <module>\n    class MarkdownInlineGrammar(mistune.InlineGrammar):\n\nAttributeError: module 'mistune' has no attribute 'InlineGrammar'\n"
! 15:26:34 | Unhandled PyOtherSide error: Cannot import module: backend.qml_bridge (Traceback (most recent call last):

  File "qrc:/src/backend/qml_bridge.py", line 181, in <module>
    BRIDGE = QMLBridge()

  File "qrc:/src/backend/qml_bridge.py", line 52, in __init__
    from .backend import Backend

  File "qrc:/src/backend/backend.py", line 24, in <module>
    from .matrix_client import MatrixClient

  File "qrc:/src/backend/matrix_client.py", line 42, in <module>
    from .html_markdown import HTML_PROCESSOR as HTML

  File "qrc:/src/backend/html_markdown.py", line 21, in <module>
    class MarkdownInlineGrammar(mistune.InlineGrammar):

AttributeError: module 'mistune' has no attribute 'InlineGrammar'
)
~ 15:26:34 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'BRIDGE' is not defined\n"
! 15:26:34 | Unhandled PyOtherSide error: Function not found: 'BRIDGE.call_backend_coro' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'BRIDGE' is not defined
\\\

from mirage.

MRAAGH avatar MRAAGH commented on June 24, 2024

You have the wrong version of mistune. Try uninstalling the mistune python package and installing version 0.8.4-4.
On Debian, you can get it with apt install python3-mistune

from mirage.

zapashcanon avatar zapashcanon commented on June 24, 2024

I have the python3-mistune from debian already, so maybe it's a problem with the debian packaging @jonassmedegaard ?

But anyway, it's stuck because of the second part:

~ 15:26:34 | "PyOtherSide error: Traceback (most recent call last):\n\n  File \"<string>\", line 1, in <module>\n\nNameError: name 'BRIDGE' is not defined\n"
! 15:26:34 | Unhandled PyOtherSide error: Function not found: 'BRIDGE.call_backend_coro' (Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'BRIDGE' is not defined

And I have no idea how to fix this. :/

from mirage.

jonassmedegaard avatar jonassmedegaard commented on June 24, 2024

from mirage.

MRAAGH avatar MRAAGH commented on June 24, 2024

Unhandled PyOtherSide error: Cannot import module: backend.qml_bridge

Bridge is not defined because qml_bridge was not imported because mistune has no attribute InlineGrammar because the wrong version is being used. Maybe you have multiple installations of mistune?

from mirage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.