Coder Social home page Coder Social logo

怎么更新 about gpt_academic HOT 6 CLOSED

binary-husky avatar binary-husky commented on August 27, 2024
怎么更新

from gpt_academic.

Comments (6)

ifyz avatar ifyz commented on August 27, 2024

没有涉及config.py更新的话,最简单的可以删掉重新拉取,再替换config.py

from gpt_academic.

binary-husky avatar binary-husky commented on August 27, 2024
cp config.py config_private.py  # 复制配置文件
git pull --force # 更新代码
# p.s. 更新完之后,config_private.py的读取顺序会比config.py高,所以不需要再把config_private.py的内容写回去

from gpt_academic.

liulang915871 avatar liulang915871 commented on August 27, 2024

更新后, 代理失效,报错如下:
代理配置 127.0.0.1:7890 , 代理所在地查询超时,代理可能无效
截屏2023-03-27 12 09 51

from gpt_academic.

binary-husky avatar binary-husky commented on August 27, 2024

@liulang915871 那可能是代理失效了,以下是测试代理的代码,是很简单的:

def check_proxy(proxies):
    import requests
    proxies_https = proxies['https'] if proxies is not None else '无'
    try:
        response = requests.get("https://ipapi.co/json/", proxies=proxies, timeout=4)
        data = response.json()
        print(f'查询代理的地理位置,返回的结果是{data}')
        country = data['country_name']
        result = f"代理配置 {proxies_https}, 代理所在地:{country}"
        print(result)
        return result
    except:
        result = f"代理配置 {proxies_https}, 代理所在地查询超时,代理可能无效"
        print(result)
        return result


if __name__ == '__main__':
    try: from config_private import proxies # 放自己的秘密如API和代理网址 os.path.exists('config_private.py')
    except: from config import proxies
    check_proxy(proxies)

如果是飞机场,有可能是ip太多人共用?

from gpt_academic.

liulang915871 avatar liulang915871 commented on August 27, 2024

@binary-husky 谢谢您的帮助,终于搞定了。 我不是代理的问题,更新后config.py其实变了,我又将原来的储存为了config_private.py。最后我将所有的都删了,重新安装配置,就成功了。

from gpt_academic.

xeeloij avatar xeeloij commented on August 27, 2024

更新后, 代理失效,报错如下: 代理配置 127.0.0.1:7890 , 代理所在地查询超时,代理可能无效 截屏2023-03-27 12 09 51

同出现问题,求详细解决步骤 … 感谢

from gpt_academic.

Related Issues (20)

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.