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

[BUG] 0.2.x 版本初始化后启动报错:AttributeError: module 'time' has no attribute 'clock' #233

Open
Evilmass opened this issue Aug 18, 2023 · 1 comment

Comments

@Evilmass
Copy link

代码版本:0.2.x

python版本:3.9.10

运行环境:virtualenv

复现过程:

virtualenv test
git clone -b 0.2.x https://github.com/TaleLin/lin-cms-flask test
cd test
pip install -r requirements.txt
python starter.py

报错信息:

(test) λ python starter.py
Traceback (most recent call last):
  File "C:\Users\qiyue\Desktop\test\starter.py", line 6, in <module>
    from app.app import create_app
  File "C:\Users\qiyue\Desktop\test\app\app.py", line 11, in <module>
    from lin import Lin
  File "C:\Users\qiyue\Envs\test\lib\site-packages\lin\__init__.py", line 10, in <module>
    from .core import Lin, route_meta, manager
  File "C:\Users\qiyue\Envs\test\lib\site-packages\lin\core.py", line 19, in <module>
    from .db import db
  File "C:\Users\qiyue\Envs\test\lib\site-packages\lin\db.py", line 7, in <module>
    from flask_sqlalchemy import SQLAlchemy as _SQLAlchemy, BaseQuery
  File "C:\Users\qiyue\Envs\test\lib\site-packages\flask_sqlalchemy\__init__.py", line 22, in <module>
    import sqlalchemy
  File "C:\Users\qiyue\Envs\test\lib\site-packages\sqlalchemy\__init__.py", line 9, in <module>
    from .sql import (
  File "C:\Users\qiyue\Envs\test\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in <module>
    from .expression import (
  File "C:\Users\qiyue\Envs\test\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in <module>
    from .visitors import Visitable
  File "C:\Users\qiyue\Envs\test\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in <module>
    from .. import util
  File "C:\Users\qiyue\Envs\test\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in <module>
    from .compat import callable, cmp, reduce,  \
  File "C:\Users\qiyue\Envs\test\lib\site-packages\sqlalchemy\util\compat.py", line 234, in <module>
    time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
@sunlin92
Copy link
Member

你好,可以尝试使用python 3.8版本来运行0.2.x分支代码,由于这是一个项目型框架,老旧分支的依赖无法兼容比较新的python版本。

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

2 participants