Freed-Wu / pyrime

ㄓ rime for python 🐍️
https://pyrime.readthedocs.io/
GNU General Public License v3.0
1 stars 0 forks source link

SystemError: PyDescr_NewMember used with Py_RELATIVE_OFFSET #2

Open cxwx opened 4 days ago

cxwx commented 4 days ago

from pyrime.prompt_toolkit import Rime Traceback (most recent call last): File "", line 1, in from pyrime.prompt_toolkit import Rime ImportError: dlopen(/opt/homebrew/lib/python3.13/site-packages/pyrime/init.cpython-313-darwin.so, 0x0002): Symbol not found: _RimeClearComposition Referenced from: <24A27071-6A04-3C06-9971-87ADDEB934F9> /opt/homebrew/lib/python3.13/site-packages/pyrime/init.cpython-313-darwin.so Expected in: /Users/XX/software/install3/lib/librime.1.12.0.dylib

Freed-Wu commented 4 days ago

What is your pyrime version?

RimeXXX() API has been depreacted after librime 1.12.0 See https://github.com/rime/librime/pull/877 All RimeXXX() should be replaced by rime->XXX().

pyrime 0.0.4 fix this bug. Please update your pyrime.

cxwx commented 4 days ago

thanks

cxwx commented 4 days ago

new errors

>>> from pyrime.prompt_toolkit import Rime
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    from pyrime.prompt_toolkit import Rime
SystemError: PyDescr_NewMember used with Py_RELATIVE_OFFSET

librime 1.12.0

Freed-Wu commented 3 days ago

where you get your librime? build from https://github.com/Homebrew/homebrew-core/pull/196833 ?

Can you try download from github release of librime?

Or nix's [librime]() or gentoo prefix's librime?

cxwx commented 3 days ago

buid mysqlf,

      1 commit 0a983b4ea8ae69546313287c1d2651ac2e742b4c (HEAD -> master, tag: latest, origin/master, origin/HEAD)
      2 Author: ksqsf <justksqsf@gmail.com>
      3 Date:   Mon Nov 18 02:35:43 2024 +0100
      4
      5     fix(navigator): wrong spans after selection (#952)

using macos M1 python3.13 homebrew

cxwx commented 3 days ago

I've built it for dynamic library, did you mean using static library? just using librime.a not librime.dylib?

Freed-Wu commented 3 days ago

I want to know if the bug comes from incorrect built librime or pyrime. If there exist a librime can make it work, we can know the librime resulting in this bug is built incorrectly. The weirdest problem is I never meet this bug in Linux.

cxwx commented 3 days ago

no problem on linux, I'll test other way later.