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

在 mac os系统上运行有问题 #56

Open
pangxiaobin opened this issue Jul 8, 2024 · 6 comments
Open

在 mac os系统上运行有问题 #56

pangxiaobin opened this issue Jul 8, 2024 · 6 comments

Comments

@pangxiaobin
Copy link

bug1: pymupdf依赖版本1.24.7已经放弃使用fitz导入了 历史记录 ,且最新版本在mac上运行错误issue
解决方案

pdm add pymupdf==1.24.1  

需要提供lockfile,来指定依赖

bug2: mac 上的 keyboard 没有以下按键

# keyboard.Key.insert.value.vk: keyboard.Key.insert,
# keyboard.Key.pause.value.vk: keyboard.Key.pause,
# keyboard.Key.print_screen.value.vk: keyboard.Key.print_screen,
# keyboard.Key.scroll_lock.value.vk: keyboard.Key.scroll_lock,
# keyboard.Key.num_lock.value.vk: keyboard.Key.num_lock,

下面是我打印的keyboard.Key List

Key.alt
Key.alt_r
Key.backspace
Key.caps_lock
Key.cmd
Key.cmd_r
Key.ctrl
Key.ctrl_r
Key.delete
Key.down
Key.end
Key.enter
Key.esc
Key.f1
Key.f2
Key.f3
Key.f4
Key.f5
Key.f6
Key.f7
Key.f8
Key.f9
Key.f10
Key.f11
Key.f12
Key.f13
Key.f14
Key.f15
Key.f16
Key.f17
Key.f18
Key.f19
Key.f20
Key.home
Key.left
Key.page_down
Key.page_up
Key.right
Key.shift
Key.shift_r
Key.space
Key.tab
Key.up
Key.media_play_pause
Key.media_volume_mute
Key.media_volume_down
Key.media_volume_up
Key.media_previous
Key.media_next

上面都解决后遇到新的问题,崩溃日志如下
main.py 加入下面的代码

import faulthandler
faulthandler.enable()
# 下面是原代码

2024-07-08 13:27:45,493 - WebSocket server started at ws://localhost:8765
2024-07-08 13:27:45,497 - Debug: True
2024-07-08 13:27:45,497 - Version: 0.2.2
2024-07-08 13:27:45,510 - TTSServer is running
2024-07-08 13:27:45,521 - Background task server 0 started.
2024-07-08 13:27:45,523 - Background task server 1 started.
[pywebview] Using Cocoa
2024-07-08 13:27:45,530 - Workflow task server started.
2024-07-08 13:27:45,533 - Qdrant task server started.
Bottle v0.12.25 server starting up (using ThreadedAdapter())...
Listening on http://127.0.0.1:9655/
Hit Ctrl-C to quit.

Fatal Python error: Illegal instruction

Thread 0x00007000109d3000 (most recent call first):
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 324 in wait
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 607 in wait
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/event.py", line 75 in wait
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/window.py", line 44 in wrapper
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/dom/element.py", line 410 in __generate_events
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/dom/element.py", line 36 in wrapper
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/dom/element.py", line 77 in __init__
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/dom/dom.py", line 22 in document
  File "/Users/hubery/Desktop/Study/vector-vein/backend/main.py", line 201 in bind
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x000070000f9d0000 (most recent call first):
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/selectors.py", line 416 in select
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/socketserver.py", line 232 in serve_forever
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/http.py", line 73 in run
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/bottle.py", line 3175 in run
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/http.py", line 141 in <lambda>
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x000070000e9cd000 (most recent call first):
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/pynput/_util/darwin.py", line 233 in _run
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/pynput/keyboard/_darwin.py", line 274 in _run
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/pynput/_util/__init__.py", line 211 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x000070000d9ca000 (most recent call first):
  File "/Users/hubery/Desktop/Study/vector-vein/backend/tts_server/server.py", line 28 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x000070000c9c7000 (most recent call first):
  File "/Users/hubery/Desktop/Study/vector-vein/backend/utilities/general/print_utils.py", line 95 in log_listener
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x000070000b9c4000 (most recent call first):
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/concurrent/futures/thread.py", line 81 in _worker
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x000070000a9c1000 (most recent call first):
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/selectors.py", line 562 in select
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/asyncio/base_events.py", line 1860 in _run_once
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/asyncio/base_events.py", line 600 in run_forever
  File "/Users/hubery/Desktop/Study/vector-vein/backend/chat_server/server.py", line 188 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x00007000099be000 (most recent call first):
  File "/Users/hubery/Desktop/Study/vector-vein/backend/background_task/server.py", line 105 in run_qdrant_task_server
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x00007000089bb000 (most recent call first):
  File "/Users/hubery/Desktop/Study/vector-vein/backend/background_task/server.py", line 75 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x00007000079b8000 (most recent call first):
  File "/Users/hubery/Desktop/Study/vector-vein/backend/background_task/server.py", line 75 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x00007000069b5000 (most recent call first):
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/selectors.py", line 416 in select
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/socketserver.py", line 232 in serve_forever
  File "/Users/hubery/Desktop/Study/vector-vein/backend/utilities/file_processing/static_file_server.py", line 41 in start
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Thread 0x00007000059b2000 (most recent call first):
  File "/Users/hubery/Desktop/Study/vector-vein/backend/worker/__init__.py", line 117 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953 in run
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
  File "/Users/hubery/.pyenv/versions/3.10.6/lib/python3.10/threading.py", line 973 in _bootstrap

Current thread 0x000000010f606dc0 (most recent call first):
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/platforms/cocoa.py", line 646 in first_show
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/platforms/cocoa.py", line 1107 in create
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/platforms/cocoa.py", line 1111 in create_window
  File "/Users/hubery/Desktop/Study/vector-vein/backend/.venv/lib/python3.10/site-packages/webview/__init__.py", line 209 in start
  File "/Users/hubery/Desktop/Study/vector-vein/backend/main.py", line 209 in main
  File "/Users/hubery/Desktop/Study/vector-vein/backend/main.py", line 213 in <module>

Extension modules: simplejson._speedups, numpy._core._multiarray_umath, numpy._core._multiarray_tests, numpy.linalg._umath_linalg, PIL._imaging, playhouse._sqlite_ext, _cffi_backend, lxml._elementpath, lxml.etree, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, pandas._libs.tslibs.ccalendar, pandas._libs.tslibs.np_datetime, pandas._libs.tslibs.dtypes, pandas._libs.tslibs.base, pandas._libs.tslibs.nattype, pandas._libs.tslibs.timezones, pandas._libs.tslibs.fields, pandas._libs.tslibs.timedeltas, pandas._libs.tslibs.tzconversion, pandas._libs.tslibs.timestamps, pandas._libs.properties, pandas._libs.tslibs.offsets, pandas._libs.tslibs.strptime, pandas._libs.tslibs.parsing, pandas._libs.tslibs.conversion, pandas._libs.tslibs.period, pandas._libs.tslibs.vectorized, pandas._libs.ops_dispatch, pandas._libs.missing, pandas._libs.hashtable, pandas._libs.algos, pandas._libs.interval, pandas._libs.lib, pandas._libs.ops, pandas._libs.hashing, pandas._libs.arrays, pandas._libs.tslib, pandas._libs.sparse, pandas._libs.internals, pandas._libs.indexing, pandas._libs.index, pandas._libs.writers, pandas._libs.join, pandas._libs.window.aggregations, pandas._libs.window.indexers, pandas._libs.reshape, pandas._libs.groupby, pandas._libs.json, pandas._libs.parsers, pandas._libs.testing, PIL._imagingft, fitz._extra, fitz._mupdf, _brotli, google._upb._message, grpc._cython.cygrpc, regex._regex, pyaudio._portaudio, websockets.speedups, charset_normalizer.md, objc._objc, CoreFoundation._CoreFoundation, CoreFoundation._inlines, Foundation._Foundation, Foundation._inlines, AppKit._AppKit, AppKit._inlines, Quartz.CoreGraphics._callbacks, Quartz.CoreGraphics._doubleindirect, Quartz.CoreGraphics._sortandmap, Quartz.CoreGraphics._coregraphics, Quartz.CoreGraphics._inlines, Quartz.ImageKit._imagekit, Quartz.CoreVideo._CVPixelBuffer, Quartz.QuartzCore._quartzcore, Quartz.PDFKit._PDFKit, Quartz.QuickLookUI._QuickLookUI, HIServices._HIServices, WebKit._WebKit, objc._machsignals (total: 88)

问题三待解决
系统信息:
macOs CataLina 10.15.7
MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports)

@AndersonBY
Copy link
Owner

最近的几个版本都没有在 Mac 上做测试,这个还得研究一下。

@yuanpusheng
Copy link

yuanpusheng commented Jul 9, 2024

我的mac keyboard 也有这个问题,把没有的几个注释掉后,跑起来是正常。但是第一遍启动完成后,前端窗口弹出来无法操作。需要杀进程重新启动,才正常。

系统信息:
macOs ventura 13.5
MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)

@AndersonBY
Copy link
Owner

https://github.com/AndersonBY/vector-vein/releases/download/v0.2.4/vector-vein-mac-v0.2.4.zip

Keyborad 那个更新了一下,0.2.4版本在我的老 Mac 上(Mac)测试了一下能正常跑起来,就是初始运行的时候有点慢,不确定是性能问题还是程序问题,不过是能正常跑起来的。

macOS Monterey
MacBook Pro (Retina, 13-inch, Early 2015)

@pangxiaobin
Copy link
Author

https://github.com/AndersonBY/vector-vein/releases/download/v0.2.4/vector-vein-mac-v0.2.4.zip

Keyborad 那个更新了一下,0.2.4版本在我的老 Mac 上(Mac)测试了一下能正常跑起来,就是初始运行的时候有点慢,不确定是性能问题还是程序问题,不过是能正常跑起来的。

macOS Monterey MacBook Pro (Retina, 13-inch, Early 2015)

更新了还是有问题,可以提供使用的python版本和lock.file 么 我使用python10没有成功,一直提示Fatal Python error: Illegal instruction 这个错误。

@AndersonBY
Copy link
Owner

pdm.zip

Python 3.12.4

@pangxiaobin
Copy link
Author

pdm.zip

Python 3.12.4

不知道2019款具体哪个库导致这个错误,cpu 指令错误, 两个2019 款mbp 都是这样的错误,Fatal Python error: Illegal instruction,不清楚是CataLina系统的问题 还是硬件问题了,但是使用macbook Air 2020 M1 芯片运行倒没有问题

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

3 participants