Coder Social home page Coder Social logo

启动出错 about takker HOT 22 CLOSED

fywinds avatar fywinds commented on May 24, 2024
启动出错

from takker.

Comments (22)

FYWinds avatar FYWinds commented on May 24, 2024

需要更详细的错误内容和复现方法
目前只能猜测是在poetry install的时候出现的错误,检查运行poetry install时的工作目录是否正确

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

升级了一下python版本解决了无法运行的问题,但运行了一段时间之后出现新的错误
→ 1101│ raise EnvCommandError(e, input=input_)

      1097output = subprocess.check_output(
      1098cmd, stderr=subprocess.STDOUT, **kwargs
      1099│                 )
      1100except CalledProcessError as e:
    → 1101raise EnvCommandError(e, input=input_)
      11021103return decode(output)
      11041105def execute(self, bin, *args, **kwargs):

已经升级到py3.9但是前面还是这条错误信息显示

/usr/local/lib/python3.8/dist-packages/poetry/utils/env.py:1101 in _run

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

后边显示

Installing watchgod (0.7)
  • Installing websockets (9.1)

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

请确保安装和运行poetry install的python版本为3.9+
即确保pip install poetry 的pip为对应python版本的pip

/usr/local/lib/python3.8/dist-packages/poetry/utils/env.py:1101 in _run

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

使用的是 Using python3.9 (3.9.5)

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

poetry需要安装在python3.9+的版本上,建议尝试重新安装poetry

建议使用的运行poetry的方法为python -m poetry install --no-dev而不是直接运行poetry,以确保poetry安装在了正确的版本上

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

使用的是 Using python3.9 (3.9.5)

这里指的应该是poetry创建虚拟环境使用了py3.9,并不代表poetry运行在py3.9上

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

at ~/.local/lib/python3.9/site-packages/poetry/utils/env.py:1101 in _run
还是无法解决问题

      1100except CalledProcessError as e:
    → 1101raise EnvCommandError(e, input=input_)
      11021103return decode(output)

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

请把完整的报错,报错的位置,运行的指令都说明清楚

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

python版本

Python 3.9.6

pip3版本

pip 21.2.4 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)

poetry版本

Poetry version 1.1.8

uvloop报错,但是自身有uvloop

uvloop in /usr/local/lib/python3.9/dist-packages (0.16.0)

这个是运行python -m poetry install --no-dev

root@ubuntu-Test:~/qbot/takker# python -m poetry install --no-dev
Installing dependencies from lock file

Package operations: 43 installs, 0 updates, 0 removalsInstalling uvloop (0.14.0): Failed

  EnvCommandError

  Command ['/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/bin/pip', 'install', '--no-deps', 'file:///root/.cache/pypoetry/artifacts/c4/0d/cb/5579978e57a4634310034f760661ff8274e1459c4d978beb4137746ab3/uvloop-0.14.0.tar.gz'] errored with the following return code 1, and output:
  Processing /root/.cache/pypoetry/artifacts/c4/0d/cb/5579978e57a4634310034f760661ff8274e1459c4d978beb4137746ab3/uvloop-0.14.0.tar.gz
  Building wheels for collected packages: uvloop
    Building wheel for uvloop (setup.py): started
    Building wheel for uvloop (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-rw0128ks/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-rw0128ks/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-rthzvwk_
         cwd: /tmp/pip-req-build-rw0128ks/
    Complete output (243 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/_patch.py -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/__init__.py -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/_noop.py -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/_testbase.py -> build/lib.linux-x86_64-3.9/uvloop
    running egg_info
    writing uvloop.egg-info/PKG-INFO
    writing dependency_links to uvloop.egg-info/dependency_links.txt
    writing top-level names to uvloop.egg-info/top_level.txt
    reading manifest file 'uvloop.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
    warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
    warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
    adding license file 'LICENSE-APACHE'
    adding license file 'LICENSE-MIT'
    writing manifest file 'uvloop.egg-info/SOURCES.txt'
    copying uvloop/cbhandles.pxd -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/cbhandles.pyx -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/dns.pyx -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/errors.pyx -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/loop.c -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/loop.pxd -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/loop.pyx -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/lru.pyx -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/pseudosock.pyx -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/request.pxd -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/request.pyx -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/server.pxd -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/server.pyx -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/sslproto.pxd -> build/lib.linux-x86_64-3.9/uvloop
    copying uvloop/sslproto.pyx -> build/lib.linux-x86_64-3.9/uvloop
    creating build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/async_.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/async_.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/basetransport.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/basetransport.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/check.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/check.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/handle.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/handle.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/idle.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/idle.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/pipe.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/pipe.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/poll.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/poll.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/process.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/process.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/stream.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/stream.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/streamserver.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/streamserver.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/tcp.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/tcp.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/timer.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/timer.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/udp.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
    copying uvloop/handles/udp.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
    creating build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/__init__.py -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/compat.h -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/consts.pxi -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/debug.h -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/debug.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/flowcontrol.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/fork_handler.h -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/python.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/stdlib.pxi -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/system.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
    copying uvloop/includes/uv.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
    running build_ext
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking if gcc supports -pedantic flag... yes
    checking for gcc way to treat warnings as errors... -Werror
    checking if gcc supports -fvisibility=hidden... yes
    checking if gcc supports -g flag... yes
    checking if gcc supports -std=gnu89 flag... yes
    checking if gcc supports -Wall flag... yes
    checking if gcc supports -Wextra flag... yes
    checking if gcc supports -Wno-long-long flag... yes
    checking if gcc supports -Wno-unused-parameter flag... yes
    checking if gcc supports -Wstrict-prototypes flag... yes
    checking for ar... ar
    checking the archiver (ar) interface... ar
    checking how to print strings... printf
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for mt... mt
    checking if mt is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking whether make supports nested variables... (cached) yes
    checking for dlopen in -ldl... yes
    checking for kstat_lookup in -lkstat... no
    checking for gethostbyname in -lnsl... yes
    checking for perfstat_cpu in -lperfstat... no
    checking for pthread_mutex_init in -lpthread... yes
    checking for clock_gettime in -lrt... yes
    checking for sendfile in -lsendfile... no
    checking for socket in -lsocket... no
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no
    checking sys/ahafs_evProds.h usability... no
    checking sys/ahafs_evProds.h presence... no
    checking for sys/ahafs_evProds.h... no
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating libuv.pc
    config.status: executing depfiles commands
    config.status: executing libtool commands
      CC       src/libuv_la-fs-poll.lo
      CC       src/libuv_la-idna.lo
      CC       src/libuv_la-inet.lo
      CC       src/libuv_la-random.lo
      CC       src/libuv_la-strscpy.lo
      CC       src/libuv_la-threadpool.lo
      CC       src/libuv_la-timer.lo
      CC       src/libuv_la-uv-data-getter-setters.lo
      CC       src/libuv_la-uv-common.lo
      CC       src/libuv_la-version.lo
      CC       src/unix/libuv_la-async.lo
      CC       src/unix/libuv_la-core.lo
      CC       src/unix/libuv_la-dl.lo
      CC       src/unix/libuv_la-fs.lo
      CC       src/unix/libuv_la-getaddrinfo.lo
      CC       src/unix/libuv_la-getnameinfo.lo
      CC       src/unix/libuv_la-loop-watcher.lo
      CC       src/unix/libuv_la-loop.lo
      CC       src/unix/libuv_la-pipe.lo
      CC       src/unix/libuv_la-poll.lo
      CC       src/unix/libuv_la-process.lo
      CC       src/unix/libuv_la-random-devurandom.lo
      CC       src/unix/libuv_la-signal.lo
      CC       src/unix/libuv_la-stream.lo
      CC       src/unix/libuv_la-tcp.lo
      CC       src/unix/libuv_la-thread.lo
      CC       src/unix/libuv_la-tty.lo
      CC       src/unix/libuv_la-udp.lo
      CC       src/unix/libuv_la-linux-core.lo
    src/unix/linux-core.c: In function 'uv__io_poll':
    src/unix/linux-core.c:363:5: warning: converting a packed 'struct epoll_event' pointer (alignment 1) to a 'uv__io_t' {aka 'struct uv__io_s'} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member]
      363 |     loop->watchers[loop->nwatchers] = (void*) events;
          |     ^~~~
    In file included from src/unix/linux-core.c:38:
    /usr/include/x86_64-linux-gnu/sys/epoll.h:83:8: note: defined here
       83 | struct epoll_event
          |        ^~~~~~~~~~~
    In file included from ./include/uv.h:66,
                     from src/unix/linux-core.c:26:
    ./include/uv/unix.h:94:8: note: defined here
       94 | struct uv__io_s {
          |        ^~~~~~~~
      CC       src/unix/libuv_la-linux-inotify.lo
      CC       src/unix/libuv_la-linux-syscalls.lo
      CC       src/unix/libuv_la-procfs-exepath.lo
      CC       src/unix/libuv_la-proctitle.lo
      CC       src/unix/libuv_la-random-getrandom.lo
      CC       src/unix/libuv_la-random-sysctl.lo
      CC       src/unix/libuv_la-sysinfo-loadavg.lo
      CCLD     libuv.la
    ar: `u' modifier ignored since `D' is the default (see `U')
    building 'uvloop.loop' extension
    creating build/temp.linux-x86_64-3.9
    creating build/temp.linux-x86_64-3.9/uvloop
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/include -I/usr/include/python3.9 -I/tmp/pip-req-build-rw0128ks/vendor/libuv/include -c uvloop/loop.c -o build/temp.linux-x86_64-3.9/uvloop/loop.o -O2
    uvloop/loop.c:20:10: fatal error: Python.h: No such file or directory
       20 | #include "Python.h"
          |          ^~~~~~~~~~
    compilation terminated.
    error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
    ----------------------------------------
    ERROR: Failed building wheel for uvloop
    Running setup.py clean for uvloop
  Failed to build uvloop
  Installing collected packages: uvloop
      Running setup.py install for uvloop: started
      Running setup.py install for uvloop: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-rw0128ks/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-rw0128ks/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-_3j6wd4g/install-record.txt --single-version-externally-managed --compile --install-headers /root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/include/site/python3.9/uvloop
           cwd: /tmp/pip-req-build-rw0128ks/
      Complete output (85 lines):
      running install
      running build
      running build_py
      creating build/lib.linux-x86_64-3.9
      creating build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/_patch.py -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/__init__.py -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/_noop.py -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/_testbase.py -> build/lib.linux-x86_64-3.9/uvloop
      running egg_info
      writing uvloop.egg-info/PKG-INFO
      writing dependency_links to uvloop.egg-info/dependency_links.txt
      writing top-level names to uvloop.egg-info/top_level.txt
      reading manifest file 'uvloop.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
      warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
      adding license file 'LICENSE-APACHE'
      adding license file 'LICENSE-MIT'
      writing manifest file 'uvloop.egg-info/SOURCES.txt'
      copying uvloop/cbhandles.pxd -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/cbhandles.pyx -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/dns.pyx -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/errors.pyx -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/loop.c -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/loop.pxd -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/loop.pyx -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/lru.pyx -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/pseudosock.pyx -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/request.pxd -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/request.pyx -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/server.pxd -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/server.pyx -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/sslproto.pxd -> build/lib.linux-x86_64-3.9/uvloop
      copying uvloop/sslproto.pyx -> build/lib.linux-x86_64-3.9/uvloop
      creating build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/async_.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/async_.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/basetransport.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/basetransport.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/check.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/check.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/handle.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/handle.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/idle.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/idle.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/pipe.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/pipe.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/poll.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/poll.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/process.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/process.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/stream.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/stream.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/streamserver.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/streamserver.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/tcp.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/tcp.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/timer.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/timer.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/udp.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
      copying uvloop/handles/udp.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
      creating build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/__init__.py -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/compat.h -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/consts.pxi -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/debug.h -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/debug.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/flowcontrol.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/fork_handler.h -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/python.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/stdlib.pxi -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/system.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
      copying uvloop/includes/uv.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
      running build_ext
      building 'uvloop.loop' extension
      creating build/temp.linux-x86_64-3.9
      creating build/temp.linux-x86_64-3.9/uvloop
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/include -I/usr/include/python3.9 -I/tmp/pip-req-build-rw0128ks/vendor/libuv/include -c uvloop/loop.c -o build/temp.linux-x86_64-3.9/uvloop/loop.o -O2
      uvloop/loop.c:20:10: fatal error: Python.h: No such file or directory
         20 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-rw0128ks/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-rw0128ks/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-_3j6wd4g/install-record.txt --single-version-externally-managed --compile --install-headers /root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/include/site/python3.9/uvloop Check the logs for full command output.
  WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
  You should consider upgrading via the '/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/bin/python -m pip install --upgrade pip' command.


  at ~/.local/lib/python3.9/site-packages/poetry/utils/env.py:1101 in _run
      1097output = subprocess.check_output(
      1098cmd, stderr=subprocess.STDOUT, **kwargs
      1099)
      1100except CalledProcessError as e:1101raise EnvCommandError(e, input=input_)
      11021103return decode(output)
      11041105def execute(self, bin, *args, **kwargs):

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

缺少python必备依赖,你的python安装并不完整

sudo apt-get install python3.9-dev

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

安装依赖后成功安装,但是好像和go-cqhttp连不上。
有几个报错信息

09-05 18:11:02 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
09-05 18:11:02 [ERROR] nonebot | Failed to import "help"
Traceback (most recent call last):
09-05 18:11:04 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

建议发完整的报错,谢谢,没有堆栈无法判断具体什么原因的

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

我pip安装了nonebot之后重新运行的信息

09-05 19:02:15 [SUCCESS] nonebot | NoneBot is initializing...
09-05 19:02:15 [INFO] nonebot | Current Env: dev
09-05 19:02:15 [DEBUG] nonebot | Loaded Config: {'driver': 'nonebot.drivers.fastapi', 'host': IPv4Address('127.0.0.1'), 'port': 18080, 'debug': True, 'log_level': None, 'api_root': {}, 'api_timeout': 30.0, 'access_token': None, 'secret': None, 'superusers': set(), 'nickname': {'Takker'}, 'command_start': {''}, 'command_sep': {'.'}, 'session_expire_timeout': datetime.timedelta(seconds=120), 'environment': 'dev'}
09-05 19:02:15 [DEBUG] nonebot | Succeeded to load adapter "cqhttp"
09-05 19:02:15 [INFO] utils | 已禁用uvicorn自动重载
09-05 19:02:15 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
Traceback (most recent call last):
  File "/root/qbot/takker/bot.py", line 22, in <module>
    nonebot.load_plugins("plugins")
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 997, in load_plugins
    result = context.run(_load_plugin, manager, plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 161, in load_plugin
    return importlib.import_module(f"{self.namespace}.{name}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/plugins/illust/__init__.py", line 20, in <module>
    from utils.utils import Processing
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/utils/utils.py", line 13, in <module>
    scheduler = require("nonebot_plugin_apscheduler").scheduler  # type: ignore
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 1141, in require
    plugin = get_plugin(name) or load_plugin(name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 976, in load_plugin
    return context.run(_load_plugin, manager, module_path)
> File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 155, in load_plugin
    return importlib.import_module(name)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot_plugin_apscheduler/__init__.py", line 13, in <module>
    scheduler = AsyncIOScheduler()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 87, in __init__
    self.configure(gconfig, **options)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 131, in configure
    self._configure(config)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/asyncio.py", line 54, in _configure
    super(AsyncIOScheduler, self)._configure(config)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 702, in _configure
    self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/unix.py", line 165, in get_localzone
    _cache_tz = _get_localzone()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/unix.py", line 90, in _get_localzone
    utils.assert_tz_offset(tz)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/utils.py", line 46, in assert_tz_offset
    raise ValueError(msg)
ValueError: Timezone offset does not match system offset: 0 != 28800. Please, check your config files.
09-05 19:02:15 [ERROR] nonebot | Failed to import "illust"
Traceback (most recent call last):
  File "/root/qbot/takker/bot.py", line 22, in <module>
    nonebot.load_plugins("plugins")
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 997, in load_plugins
    result = context.run(_load_plugin, manager, plugin_name)
> File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 161, in load_plugin
    return importlib.import_module(f"{self.namespace}.{name}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/plugins/illust/__init__.py", line 20, in <module>
    from utils.utils import Processing
  File "/root/qbot/takker/utils/utils.py", line 13, in <module>
    scheduler = require("nonebot_plugin_apscheduler").scheduler  # type: ignore
AttributeError: 'NoneType' object has no attribute 'scheduler'
09-05 19:02:15 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
Traceback (most recent call last):
  File "/root/qbot/takker/bot.py", line 22, in <module>
    nonebot.load_plugins("plugins")
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 997, in load_plugins
    result = context.run(_load_plugin, manager, plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 161, in load_plugin
    return importlib.import_module(f"{self.namespace}.{name}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/plugins/hook.py", line 19, in <module>
    from utils.utils import perm_check, enable_check, ExploitCheck
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/utils/utils.py", line 13, in <module>
    scheduler = require("nonebot_plugin_apscheduler").scheduler  # type: ignore
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 1141, in require
    plugin = get_plugin(name) or load_plugin(name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 976, in load_plugin
    return context.run(_load_plugin, manager, module_path)
> File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 155, in load_plugin
    return importlib.import_module(name)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot_plugin_apscheduler/__init__.py", line 13, in <module>
    scheduler = AsyncIOScheduler()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 87, in __init__
    self.configure(gconfig, **options)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 131, in configure
    self._configure(config)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/asyncio.py", line 54, in _configure
    super(AsyncIOScheduler, self)._configure(config)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 702, in _configure
    self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/unix.py", line 165, in get_localzone
    _cache_tz = _get_localzone()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/unix.py", line 90, in _get_localzone
    utils.assert_tz_offset(tz)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/utils.py", line 46, in assert_tz_offset
    raise ValueError(msg)
ValueError: Timezone offset does not match system offset: 0 != 28800. Please, check your config files.
09-05 19:02:15 [ERROR] nonebot | Failed to import "hook"
Traceback (most recent call last):
  File "/root/qbot/takker/bot.py", line 22, in <module>
    nonebot.load_plugins("plugins")
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 997, in load_plugins
    result = context.run(_load_plugin, manager, plugin_name)
> File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 161, in load_plugin
    return importlib.import_module(f"{self.namespace}.{name}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/plugins/hook.py", line 19, in <module>
    from utils.utils import perm_check, enable_check, ExploitCheck
  File "/root/qbot/takker/utils/utils.py", line 13, in <module>
    scheduler = require("nonebot_plugin_apscheduler").scheduler  # type: ignore
AttributeError: 'NoneType' object has no attribute 'scheduler'
09-05 19:02:15 [SUCCESS] nonebot | Succeeded to import "illust_submit"
09-05 19:02:15 [SUCCESS] nonebot | Succeeded to import "perm_control"
09-05 19:02:15 [SUCCESS] nonebot | Succeeded to import "atri"
09-05 19:02:15 [SUCCESS] nonebot | Succeeded to import "withdraw"
09-05 19:02:16 [SUCCESS] nonebot | Succeeded to import "summary_wordcloud"
09-05 19:02:16 [SUCCESS] nonebot | Succeeded to import "noticement"
09-05 19:02:16 [SUCCESS] nonebot | Succeeded to import "invite_check"
09-05 19:02:16 [SUCCESS] nonebot | Succeeded to import "daily_check"
09-05 19:02:16 [SUCCESS] nonebot | Succeeded to import "stats_log"
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "kisskiss"
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "dinggong"
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "repeater"
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "hitokoto"
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "petpet"
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "songpicker"
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "plugin_manager"
09-05 19:02:17 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
Traceback (most recent call last):
  File "/root/qbot/takker/bot.py", line 22, in <module>
    nonebot.load_plugins("plugins")
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 997, in load_plugins
    result = context.run(_load_plugin, manager, plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 161, in load_plugin
    return importlib.import_module(f"{self.namespace}.{name}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/plugins/help.py", line 14, in <module>
    from utils.utils import enable_check
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/utils/utils.py", line 13, in <module>
    scheduler = require("nonebot_plugin_apscheduler").scheduler  # type: ignore
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 1141, in require
    plugin = get_plugin(name) or load_plugin(name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 976, in load_plugin
    return context.run(_load_plugin, manager, module_path)
> File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 155, in load_plugin
    return importlib.import_module(name)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot_plugin_apscheduler/__init__.py", line 13, in <module>
    scheduler = AsyncIOScheduler()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 87, in __init__
    self.configure(gconfig, **options)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 131, in configure
    self._configure(config)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/asyncio.py", line 54, in _configure
    super(AsyncIOScheduler, self)._configure(config)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 702, in _configure
    self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/unix.py", line 165, in get_localzone
    _cache_tz = _get_localzone()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/unix.py", line 90, in _get_localzone
    utils.assert_tz_offset(tz)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/utils.py", line 46, in assert_tz_offset
    raise ValueError(msg)
ValueError: Timezone offset does not match system offset: 0 != 28800. Please, check your config files.
09-05 19:02:17 [ERROR] nonebot | Failed to import "help"
Traceback (most recent call last):
  File "/root/qbot/takker/bot.py", line 22, in <module>
    nonebot.load_plugins("plugins")
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 997, in load_plugins
    result = context.run(_load_plugin, manager, plugin_name)
> File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 161, in load_plugin
    return importlib.import_module(f"{self.namespace}.{name}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/qbot/takker/plugins/help.py", line 14, in <module>
    from utils.utils import enable_check
  File "/root/qbot/takker/utils/utils.py", line 13, in <module>
    scheduler = require("nonebot_plugin_apscheduler").scheduler  # type: ignore
AttributeError: 'NoneType' object has no attribute 'scheduler'
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "hhsh"
09-05 19:02:17 [SUCCESS] nonebot | Succeeded to import "ask"
09-05 19:02:17 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"
Traceback (most recent call last):
  File "/root/qbot/takker/bot.py", line 23, in <module>
    nonebot.load_from_toml("pyproject.toml")
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 1081, in load_from_toml
    return load_all_plugins(set(plugins), set(plugin_dirs))
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 1023, in load_all_plugins
    result = context.run(_load_plugin, manager, plugin_name)
> File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/__init__.py", line 945, in _load_plugin
    module = manager.load_plugin(plugin_name)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 155, in load_plugin
    return importlib.import_module(name)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot/plugin/manager.py", line 267, in exec_module
    super().exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/nonebot_plugin_apscheduler/__init__.py", line 13, in <module>
    scheduler = AsyncIOScheduler()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 87, in __init__
    self.configure(gconfig, **options)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 131, in configure
    self._configure(config)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/asyncio.py", line 54, in _configure
    super(AsyncIOScheduler, self)._configure(config)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 702, in _configure
    self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/unix.py", line 165, in get_localzone
    _cache_tz = _get_localzone()
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/unix.py", line 90, in _get_localzone
    utils.assert_tz_offset(tz)
  File "/root/.cache/pypoetry/virtualenvs/takker-reborn-NcqX0U7w-py3.9/lib/python3.9/site-packages/tzlocal/utils.py", line 46, in assert_tz_offset
    raise ValueError(msg)
ValueError: Timezone offset does not match system offset: 0 != 28800. Please, check your config files.
09-05 19:02:17 [SUCCESS] nonebot | Running NoneBot...
09-05 19:02:17 [DEBUG] nonebot | Loaded adapters: cqhttp
09-05 19:02:17 [INFO] uvicorn | Started server process [127825]
09-05 19:02:17 [INFO] uvicorn | Waiting for application startup.
09-05 19:02:17 [DEBUG] service | 开始连接数据库
09-05 19:02:17 [INFO] service | 数据库连接成功
09-05 19:02:17 [INFO] utils | 正在检查/安装Chormium更新
09-05 19:02:17 [INFO] uvicorn | Application startup complete.
09-05 19:02:17 [INFO] uvicorn | Uvicorn running on http://127.0.0.1:18080 (Press CTRL+C to quit)
^C
09-05 19:03:58 [INFO] uvicorn | Shutting down
09-05 19:03:58 [INFO] uvicorn | Waiting for application shutdown.
09-05 19:03:58 [INFO] uvicorn | Application shutdown complete.
09-05 19:03:58 [INFO] uvicorn | Finished server process [127825]

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

image
系统时区问题,这个需要你自己手动修改服务器的系统时区为Asia/Shanghai

sudo timedatectl set-timezone Asia/Shanghai

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

设置了,但还是报同样的错误

from takker.

FYWinds avatar FYWinds commented on May 24, 2024
cat /etc/timezone

返回什么

设置时区后需要重新连接ssh(即开启新的bash进程),才有效

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

您完全不看部署教程是吗

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

一步步走的啊..我也不知道为啥这么多问题0....0

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

是需要设置成反向ws?

from takker.

FYWinds avatar FYWinds commented on May 24, 2024

部署教程


包含了go-cqhttp应该配置的内容和nonebot应该配置的内容

image
nonebot这边如果你下载的是release里的文件,那么你不需要再修改端口之类的配置

from takker.

xiaotian1339 avatar xiaotian1339 commented on May 24, 2024

谢谢,我以为时默认的配置加了一些注释,没往下面看,已经部署成功

from takker.

Related Issues (12)

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.