Coder Social home page Coder Social logo

Comments (13)

amcai avatar amcai commented on July 19, 2024

可以贴图吗?应该linux,mac都行的,windows 倒是不得行。

from myscan.

jinqi520 avatar jinqi520 commented on July 19, 2024

图片

这个应该和系统没关系吧 这上面是打印的redis变量 后面都成None了

from myscan.

amcai avatar amcai commented on July 19, 2024

和系统有原因,python在windows上,多进程不会共享变量过去。就是因为这个原因,项目不支持windows。

from myscan.

jinqi520 avatar jinqi520 commented on July 19, 2024

我的是mac啊

from myscan.

amcai avatar amcai commented on July 19, 2024

可能我理解你的问题理解错了,你mac启动时候使用了---redis password@host:port:db 这个连接参数吗?默认是本地的127.0.0.1:6379:0

from myscan.

jinqi520 avatar jinqi520 commented on July 19, 2024

使用了啊 你看我上面的截图 父进程连接的是redis 打印的是远程ip和端口 进入子进程后 获取redis连接就是null了

from myscan.

amcai avatar amcai commented on July 19, 2024

mac 如果是新版本的系统,还要添加一个环境变量 export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES,这个我同事很多都遇到过的。

from myscan.

jinqi520 avatar jinqi520 commented on July 19, 2024

我用憨憨操作算了 初始化的时候将redis信息写入文件或系统环境变量中
然后getredis时 如果为null再重新获取一个redis连接
image
这样在windows下也能用

from myscan.

jinqi520 avatar jinqi520 commented on July 19, 2024

image

这个错误是为啥 之前也遇到过

from myscan.

amcai avatar amcai commented on July 19, 2024

你刚才只解决一个redis问题,但是还有很多全局变量问题,比如你报错这个又是因为cmd_line_options这个变量没共享过去。归根到底,还是全局变量问题,python版本目前是多少?之前那个命令执行了是不行吗?

from myscan.

jinqi520 avatar jinqi520 commented on July 19, 2024

python3.8 加了你说的那个环境变量也不行

from myscan.

amcai avatar amcai commented on July 19, 2024

3.8可能会出问题,尝试弄个3.7.5的环境,mac安装pyenv,好切换的。

from myscan.

Abrahamnn avatar Abrahamnn commented on July 19, 2024

同样是mac,3.7.2版本,也是同样的错误。

from myscan.

Related Issues (14)

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.