Closed rainyzz closed 8 years ago
/Users/USER/Library/Application Support/com.typcn.bilibili/*/youget.bundle/Contents/Resources/you-get.bundle/Contents/MacOS/you-get
路径里面这个 * 是什么情况?
这个不太清楚,youget实际上的目录是/Users/rainystars/Library/Application Support/com.typcn.bilibili/Plugins/youget.bundle/Contents/Resources/you-get.bundle/Contents/MacOS/you-get
直接在命令行执行会不会正常输出?
直接执行显示
[1] 51345 illegal hardware instruction ./you-get
然后系统生成和最开始一样的crash log
按理说这个问题只有在跨很多大版本的编译器或者是跨架构(例如powerpc)中出现。。。
我特地升级了系统发现也可以正常解析。。
你的 CPU 型号是什么?难道是指令集问题
在命令行中输入sysctl machdep.cpu
,显示如下,我的本子是2013 Early的15 rmpb
machdep.cpu.max_basic: 13
machdep.cpu.max_ext: 2147483656
machdep.cpu.vendor: GenuineIntel
machdep.cpu.brand_string: Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz
machdep.cpu.family: 6
machdep.cpu.model: 58
machdep.cpu.extmodel: 3
machdep.cpu.extfamily: 0
machdep.cpu.stepping: 9
machdep.cpu.feature_bits: 9203919201183202303
machdep.cpu.leaf7_feature_bits: 641
machdep.cpu.extfeature_bits: 4967106816
machdep.cpu.signature: 198313
machdep.cpu.brand: 0
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC POPCNT AES PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C
machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS
machdep.cpu.extfeatures: SYSCALL XD EM64T LAHF RDTSCP TSCI
machdep.cpu.logical_per_package: 16
machdep.cpu.cores_per_package: 8
machdep.cpu.microcode_version: 21
machdep.cpu.processor_flag: 4
machdep.cpu.mwait.linesize_min: 64
machdep.cpu.mwait.linesize_max: 64
machdep.cpu.mwait.extensions: 3
machdep.cpu.mwait.sub_Cstates: 135456
machdep.cpu.thermal.sensor: 1
machdep.cpu.thermal.dynamic_acceleration: 1
machdep.cpu.thermal.invariant_APIC_timer: 1
machdep.cpu.thermal.thresholds: 2
machdep.cpu.thermal.ACNT_MCNT: 1
machdep.cpu.thermal.core_power_limits: 1
machdep.cpu.thermal.fine_grain_clock_mod: 1
machdep.cpu.thermal.package_thermal_intr: 1
machdep.cpu.thermal.hardware_feedback: 0
machdep.cpu.thermal.energy_policy: 0
machdep.cpu.xsave.extended_state: 7 832 832 0
machdep.cpu.xsave.extended_state1: 1 0 0 0
machdep.cpu.arch_perf.version: 3
machdep.cpu.arch_perf.number: 4
machdep.cpu.arch_perf.width: 48
machdep.cpu.arch_perf.events_number: 7
machdep.cpu.arch_perf.events: 0
machdep.cpu.arch_perf.fixed_number: 3
machdep.cpu.arch_perf.fixed_width: 48
machdep.cpu.cache.linesize: 64
machdep.cpu.cache.L2_associativity: 8
machdep.cpu.cache.size: 256
machdep.cpu.tlb.inst.small: 64
machdep.cpu.tlb.inst.large: 8
machdep.cpu.tlb.data.small: 64
machdep.cpu.tlb.data.large: 32
machdep.cpu.tlb.shared: 512
machdep.cpu.address_bits.physical: 36
machdep.cpu.address_bits.virtual: 48
machdep.cpu.core_count: 4
machdep.cpu.thread_count: 8
machdep.cpu.tsc_ccc.numerator: 0
machdep.cpu.tsc_ccc.denominator: 0
此外,我去安装了原始的You-get项目,是能够正常使用的
然后我发现运行和you-get同一目录下的python执行文件也是一样报错的
Process: python [79703]
Path: /Users/USER/Library/Application Support/com.typcn.bilibili/*/youget.bundle/Contents/Resources/you-get.bundle/Contents/MacOS/python
Identifier: python
Version: 0
Code Type: X86-64 (Native)
Parent Process: zsh [65994]
Responsible: iTerm [785]
User ID: 501
Date/Time: 2016-02-01 10:56:15.064 +0800
OS Version: Mac OS X 10.11.3 (15D21)
Report Version: 11
Anonymous UUID: 944B0722-8617-FFEB-7C2C-CB617427D44A
Sleep/Wake UUID: ADAD486E-E8ED-4A38-808D-C762D13CE551
Time Awake Since Boot: 55000 seconds
Time Since Wake: 7400 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.python.python 0x00000001063952b7 0x106330000 + 414391
1 org.python.python 0x0000000106395651 _Py_DecodeUTF8_surrogateescape + 110
2 org.python.python 0x000000010640e19b Py_DecodeLocale + 29
3 python 0x000000010632add6 0x106329000 + 7638
4 libdyld.dylib 0x00007fff9407f5ad start + 1
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fff598d6760 rcx: 0x00007fff598d6450 rdx: 0x00007fc193c07670
rdi: 0x00007fff598d6458 rsi: 0x00007fff598d6760 rbp: 0x00007fff598d6440 rsp: 0x00007fff598d6418
r8: 0x00007fc193c07670 r9: 0x00007fff598d6758 r10: 0x00007fff598d6760 r11: 0x8080808080808080
r12: 0x00007fff598d6450 r13: 0x0000000000000000 r14: 0x00007fc193c07670 r15: 0x00007fff598d6458
rip: 0x00000001063952b7 rfl: 0x0000000000010206 cr2: 0x00000001064754a0
Logical CPU: 2
Error Code: 0x00000000
Trap Number: 6
Binary Images:
0x106329000 - 0x10632afff +python (0) <5C6F6809-C59B-3AC1-AC86-E8438AD91818> /Users/USER/Library/Application Support/com.typcn.bilibili/*/youget.bundle/Contents/Resources/you-get.bundle/Contents/MacOS/python
0x106330000 - 0x1064a1fff +org.python.python (3.5.1, [c] 2001-2015 Python Software Foundation. - 3.5.1) <C0839644-3E3C-397E-8546-7532F2C2AFE2> /Users/USER/Library/Application Support/com.typcn.bilibili/*/youget.bundle/Contents/Resources/you-get.bundle/Contents/Frameworks/Python.framework/Versions/3.5/Python
0x106546000 - 0x10654eff7 +libintl.8.dylib (0) <17404DBD-6AA2-3FBE-B8FB-646E2FF5AE69> /Users/USER/Library/Application Support/com.typcn.bilibili/*/youget.bundle/Contents/Resources/you-get.bundle/Contents/Frameworks/libintl.8.dylib
0x106780000 - 0x10678fff7 libSimplifiedChineseConverter.dylib (68) <DCFEA0D3-593E-3E5C-B311-53B8ACF8A318> /System/Library/CoreServices/Encodings/libSimplifiedChineseConverter.dylib
0x7fff6d1e3000 - 0x7fff6d21a007 dyld (360.19) <9D05FDF4-65CE-3B53-86D4-ABE1A5BF35F3> /usr/lib/dyld
0x7fff88cae000 - 0x7fff88d3bfff libsystem_c.dylib (1082.20.4) <EAB38A6C-8671-3B13-B500-90EC1B912063> /usr/lib/system/libsystem_c.dylib
0x7fff89507000 - 0x7fff89507ff7 liblaunch.dylib (756.20.4) <EDF719D6-D2BB-38DD-8C94-4272BEFDA2CD> /usr/lib/system/liblaunch.dylib
0x7fff8a335000 - 0x7fff8a33eff3 libsystem_notify.dylib (150.20.3) <243FADE1-255A-3B78-8033-F336CD64B817> /usr/lib/system/libsystem_notify.dylib
0x7fff8c9db000 - 0x7fff8c9dbff7 libkeymgr.dylib (28) <09397E01-6066-3179-A50C-2CE666FDA929> /usr/lib/system/libkeymgr.dylib
0x7fff8d877000 - 0x7fff8d879ff7 libquarantine.dylib (80) <163CF63A-7455-3D1F-AE57-8C4475A9204C> /usr/lib/system/libquarantine.dylib
0x7fff8db7a000 - 0x7fff8db8bff7 libsystem_trace.dylib (201.10.3) <B485369F-E3A1-319E-998C-89AAF606079E> /usr/lib/system/libsystem_trace.dylib
0x7fff8dd93000 - 0x7fff8ddf4ff7 libsystem_network.dylib (583.20.10) <865FE79A-A22D-3733-A14F-FC7B37F3AECD> /usr/lib/system/libsystem_network.dylib
0x7fff8ec1d000 - 0x7fff8ec46fff libxpc.dylib (756.20.4) <61AB4610-9304-354C-9E9B-D57198AE9866> /usr/lib/system/libxpc.dylib
0x7fff8ec93000 - 0x7fff8ec93ff7 libunc.dylib (29) <1D0F8265-F026-3CBD-93D3-F8DF14FFCE68> /usr/lib/system/libunc.dylib
0x7fff8f845000 - 0x7fff8f847fff libsystem_coreservices.dylib (19.2) <1B3F5AFC-FFCD-3ECB-8B9A-5538366FB20D> /usr/lib/system/libsystem_coreservices.dylib
0x7fff8fb0c000 - 0x7fff8fb1dff7 libz.1.dylib (61.20.1) <B3EBB42F-48E3-3287-9F0D-308E04D407AC> /usr/lib/libz.1.dylib
0x7fff900e2000 - 0x7fff900e3ffb libSystem.B.dylib (1226.10.1) <5A4257EF-3145-3BB3-87A4-0D2404A9462D> /usr/lib/libSystem.B.dylib
0x7fff90380000 - 0x7fff90385ff7 libmacho.dylib (875.1) <CB745E1F-4885-3F96-B38B-2093DF488FD5> /usr/lib/system/libmacho.dylib
0x7fff915a3000 - 0x7fff915a5ff7 libsystem_configuration.dylib (802.20.7) <5FD79070-36CC-3D02-BEA7-BB5D2AE97D5D> /usr/lib/system/libsystem_configuration.dylib
0x7fff91be9000 - 0x7fff91becff7 libsystem_sandbox.dylib (460.30.1) <3E0036AF-FC64-3352-8DA4-6B550C2C2562> /usr/lib/system/libsystem_sandbox.dylib
0x7fff91bed000 - 0x7fff91beeffb libremovefile.dylib (41) <B8D1A5FC-CFD5-3AAB-8A10-14DDC129710A> /usr/lib/system/libremovefile.dylib
0x7fff92561000 - 0x7fff92562fff libDiagnosticMessagesClient.dylib (100) <4243B6B4-21E9-355B-9C5A-95A216233B96> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff92569000 - 0x7fff92596fff libdispatch.dylib (501.20.1) <324C9189-2AF3-3356-847F-6F4CE1C6E901> /usr/lib/system/libdispatch.dylib
0x7fff9402f000 - 0x7fff9404bff7 libsystem_malloc.dylib (67) <9EECAB18-F025-34C4-8E32-7EFFA6720EFC> /usr/lib/system/libsystem_malloc.dylib
0x7fff9407c000 - 0x7fff9407fffb libdyld.dylib (360.19) <AA629043-C6F6-32FE-8007-E3478E99ACA7> /usr/lib/system/libdyld.dylib
0x7fff945b1000 - 0x7fff947beffb libicucore.A.dylib (551.41) <CFFD7342-A7D6-323A-AC14-B9EECF6EFFED> /usr/lib/libicucore.A.dylib
0x7fff949ea000 - 0x7fff949efff3 libunwind.dylib (35.3) <124E0F05-2350-3774-A32C-7F5BF38EDE73> /usr/lib/system/libunwind.dylib
0x7fff94c73000 - 0x7fff94ca2ffb libsystem_m.dylib (3105) <26655445-CA97-321E-B221-801CB378D1AA> /usr/lib/system/libsystem_m.dylib
0x7fff94d64000 - 0x7fff94d65fff libsystem_secinit.dylib (20) <FD6ECF2C-1489-32CA-981B-9045B5EB1FAA> /usr/lib/system/libsystem_secinit.dylib
0x7fff95298000 - 0x7fff9529cfff libcache.dylib (75) <6B245C0A-F3EA-383B-A542-5B0D0456A41B> /usr/lib/system/libcache.dylib
0x7fff954de000 - 0x7fff95555fe7 libcorecrypto.dylib (335.20.1) <C6BD205F-4ECE-37EE-BCAB-A76F39CDCFFA> /usr/lib/system/libcorecrypto.dylib
0x7fff95fd8000 - 0x7fff95fe0fe7 libsystem_platform.dylib (74.10.3) <D3A27E10-7F08-3603-ACC8-7A92B2C04BAB> /usr/lib/system/libsystem_platform.dylib
0x7fff9600d000 - 0x7fff96053ff7 libauto.dylib (186) <999E610F-41FC-32A3-ADCA-5EC049B65DFB> /usr/lib/libauto.dylib
0x7fff961b0000 - 0x7fff961c6ff7 libsystem_coretls.dylib (83.20.8) <75C97D88-0A63-3093-AE83-DE33EB7405CE> /usr/lib/system/libsystem_coretls.dylib
0x7fff96a44000 - 0x7fff96ebafff com.apple.CoreFoundation (6.9 - 1256.14) <768A7FB7-9143-3148-8591-7C6ED3162D35> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff97258000 - 0x7fff97276fff libsystem_kernel.dylib (3248.30.4) <9CEB6C3B-1CAF-3C32-A9FD-93BC72CBCEA1> /usr/lib/system/libsystem_kernel.dylib
0x7fff97277000 - 0x7fff972a0fff libc++abi.dylib (125) <DCCC8177-3D09-35BC-9784-2A04FEC4C71B> /usr/lib/libc++abi.dylib
0x7fff976ef000 - 0x7fff976f7ffb libsystem_dnssd.dylib (625.20.4) <945B5FB1-DA91-3D45-A961-A8FAD53C1E7E> /usr/lib/system/libsystem_dnssd.dylib
0x7fff97aa5000 - 0x7fff97ab0ff7 libcommonCrypto.dylib (60075.20.1) <766BC3F5-41F3-3315-BABC-72718A98EA92> /usr/lib/system/libcommonCrypto.dylib
0x7fff97f1a000 - 0x7fff97f21ff7 libcompiler_rt.dylib (62) <D3C4AB40-23B4-3BC6-8C38-5B8758D14E80> /usr/lib/system/libcompiler_rt.dylib
0x7fff99581000 - 0x7fff998ec657 libobjc.A.dylib (680) <58CB8CFC-7DBD-3A53-BD72-A42FF799B21E> /usr/lib/libobjc.A.dylib
0x7fff99e11000 - 0x7fff99e19fff libcopyfile.dylib (127) <F5133269-0B22-388C-A57C-079667B6291E> /usr/lib/system/libcopyfile.dylib
0x7fff9a5dc000 - 0x7fff9a62fff7 libc++.1.dylib (120.1) <8FC3D139-8055-3498-9AC5-6467CB7F4D14> /usr/lib/libc++.1.dylib
0x7fff9afdf000 - 0x7fff9afe0fff libsystem_blocks.dylib (65) <49D42329-7DE9-3413-92C3-A473A7E9CF35> /usr/lib/system/libsystem_blocks.dylib
0x7fff9c27e000 - 0x7fff9c370ff7 libiconv.2.dylib (44) <F05A0A5A-92A9-3668-8F20-F27CBDA26BE9> /usr/lib/libiconv.2.dylib
0x7fff9c4ac000 - 0x7fff9c4b4fff libsystem_networkextension.dylib (385.20.6) <DC8A102A-BF02-31A4-8914-65C34DF6B592> /usr/lib/system/libsystem_networkextension.dylib
0x7fff9cbb5000 - 0x7fff9cbccff7 libsystem_asl.dylib (322.30.1) <9B500E4E-E462-321E-828E-5524DC984C1B> /usr/lib/system/libsystem_asl.dylib
0x7fff9cbcd000 - 0x7fff9cbd6ff7 libsystem_pthread.dylib (138.10.4) <327CECD0-B881-3153-8FCC-4FD4818B7F16> /usr/lib/system/libsystem_pthread.dylib
0x7fff9d5aa000 - 0x7fff9d5d3fff libsystem_info.dylib (477.20.1) <6513635B-4ADE-3B45-BF63-ED7AC565B0C9> /usr/lib/system/libsystem_info.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 1212794
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=107.8M resident=0K(0%) swapped_out_or_unallocated=107.8M(100%)
Writable regions: Total=27.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=27.5M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 2048K 2
Kernel Alloc Once 4K 2
MALLOC 9396K 8
MALLOC guard page 16K 4
STACK GUARD 4K 2
Stack 16.0M 2
VM_ALLOCATE 4K 2
__DATA 3416K 50
__LINKEDIT 91.2M 7
__TEXT 16.6M 50
__UNICODE 552K 2
shared memory 8K 3
=========== ======= =======
TOTAL 138.8M 122
这就奇怪了啊。。。 可以肯定是我打包的瘦身过的 python 解释器的问题,但是我什么会出现这种错误呢。。
确实挺奇怪的,那有没有办法为这个插件提供一个指定外部python解释器的选项啊,直接用系统里装的python
暂时没有,不过可以替换掉那个 you-get 的可执行文件,改成调用系统的 python3 执行,然后重定向管道输出,可以考虑之后的版本加个 fallback
我下载了最新的youget插件(版本3),并将主程序更新到2.28之后,在youget插件的设置中选择使用系统本地的youget,将地址设置为/usr/local/bin/you-get,参数为--debug 然后发现各网站视频依然无法解析 错误提示如下:
视频解析失败,返回信息:
you-get: version 0.4.245, a tiny downloader that scrapes the web.
you-get: ['http://www.bilibili.com/video/av3781088/']
Site: bilibili.com
Title: Traceback (most recent call last):
File "/usr/local/bin/you-get", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/site-packages/you_get/__main__.py", line 92, in main
main(**kwargs)
File "/usr/local/lib/python3.5/site-packages/you_get/common.py", line 1237, in main
script_main('you-get', any_download, any_download_playlist, **kwargs)
File "/usr/local/lib/python3.5/site-packages/you_get/common.py", line 1158, in script_main
download_main(download, download_playlist, args, playlist, output_dir=output_dir, merge=merge, info_only=info_only, json_output=json_output, caption=caption)
File "/usr/local/lib/python3.5/site-packages/you_get/common.py", line 1006, in download_main
download(url, **kwargs)
File "/usr/local/lib/python3.5/site-packages/you_get/common.py", line 1230, in any_download
m.download(url, **kwargs)
File "/usr/local/lib/python3.5/site-packages/you_get/extractors/bilibili.py", line 145, in bilibili_download
bilibili_download_by_cid(cid, title, output_dir=output_dir, merge=merge, info_only=info_only)
File "/usr/local/lib/python3.5/site-packages/you_get/extractors/bilibili.py", line 106, in bilibili_download_by_cid
print_info(site_info, title, type_, size)
File "/usr/local/lib/python3.5/site-packages/you_get/common.py", line 941, in print_info
print("Title: ", unescape_html(tr(title)))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-10: ordinal not in range(128)
如果在系统中直接调用/usr/local/bin/you-get http://www.bilibili.com/video/av3781088/
是可以正常执行的,因为我的系统原因,在/Users/rainystars/Library/Application Support/com.typcn.bilibili/Plugins/youget.bundle/Contents/Resources/you-get.bundle
中的程序都是无法执行的,是不是设置了外部的you-get也有可能会用到该目录中的东西还是其他的原因?
并不会掉用 看这个样子已经是解析成功了,但是在返回内容的时候出错了
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-10: ordinal not in range(128)
可能只是这个网页标题有奇葩字符?或者是脚本本身的编码问题?
直接在系统中you-get调用同样的网址,是能够正常解析出Title的,如下 ➜ ~ you-get http://www.bilibili.com/video/av3781088/ Site: bilibili.com Title: 四大欠王给大家拜年啦! Type: Flash video (video/x-flv) Size: 29.44 MiB (30866963 Bytes)
在mac客户端中调用,那个title就直接是没有东西了,这个在您的电脑上是能够正常运行的么?
you-get: version 0.4.245, a tiny downloader that scrapes the web.
you-get: ['http://www.bilibili.com/video/av3781088/']
Site: bilibili.com
Title:
看那个debug主要是title中包含了非法字符
em... 可能是没有设置相关的编码环境变量之类的,尝试修改那段py直接干掉title输出试试?
干掉就可以了。。。谢谢
额,您好,我2.28 youget版本3下遇到了同样的问题,我想问下最后这个问题是怎样解决的?
我装了一个原始版本的youget 然后在插件里面把youget地址设置为原始版本的youget 然后原始版本加--debug参数后发现还是有点问题。
/usr/local/lib/python3.5/site-packages/you_get/common.py", line 941, in print_info
print("Title: ", unescape_html(tr(title)))
就手工找到这行把它注释掉就好了,但有些网站还是有点小问题,但我常看的几个:斗鱼,acfun都可以了
在最新的2.26版本中使用最新的You-get插件(版本2),在youget支持的所有网站中视频页面点击右上角播放按钮后,均出现视频解析失败,返回错误信息为空
并且多次删除youget插件重装均无效
youget crash的日志如下