Git Product home page Git Product logo

Comments (4)

KaHuier avatar KaHuier commented on July 20, 2024

在我终于修改完成后 出现 ImportError: cannot import name 'std_print' from 'lk_logger.general'

from pyportable-installer.

KaHuier avatar KaHuier commented on July 20, 2024

注释掉该行导入 并把使用到std_print的 我看了使用到该函数的代码 我想这只是一个日志输出 我替换成print 终于可以用了

from pyportable-installer.

likianta avatar likianta commented on July 20, 2024

通过查看 发现是 markup.py里出现错误

也就是这个文件的第36行 MarksMeaning = dict[MarkMeaning, t.Any] ?

通过我看了看 我觉得你这个是不在定义类型 MarksMeaning = Dict[MarkMeaning, t.Any] 它应该是这样的吧

我发现很多文件你定义类型用的都是小写的 我使用3.8 全部报错,是不支持3.8嘛?

是的. 该写法在 python 3.9 得到支持, 参见 官方新特性介绍 (PEP-585 部分).

我在最近的 lk-logger 版本中也发现了 python 3.8 的运行问题. 在今天 (8 月 31 日) 我发布了 5.2.4 版本尝试修复它. 请你也更新到最新的版本:

pip install --upgrade lk-logger
# 请确认该版本号升级为 5.2.4 或以上.

5.2.4 版本在 python 3.8 上应该能够正常运行. 如果仍然遇到问题, 请你在 lk-logger 仓库中创建新的 issue, 我会尽快跟进!

from pyportable-installer.

likianta avatar likianta commented on July 20, 2024

注释掉该行导入 并把使用到std_print的 我看了使用到该函数的代码 我想这只是一个日志输出 我替换成print 终于可以用了

这里确实是用于打印输出, 你的改动可以通过, 尽管效果可能与预期存在一些差异.

下面是一些补充说明.

在新版 lk-logger 中, std_print 被改名为 builtin_print. 它的写法变成了:

from lk_logger import builtin_print
builtin_print(...)

builtin_print 与 python 内置的 print 用法相同. 与之相对的, print 在当前上下文中指向的其实是 lk-logger 的魔术打印方法.

from pyportable-installer.

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.