Frrrrrrrrank / auto_job__find__chatgpt__rpa

This is a tool used to automatically generate a cover letter using chatgpt based on your resume and job description and send messages to bosses in China.
1.44k stars 216 forks source link

pwd包报错 #37

Closed loks666 closed 5 months ago

loks666 commented 7 months ago

已连接到 pydev 调试器(内部版本号 233.13763.11)Traceback (most recent call last): File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "H:\Project\AI\auto_jobfindchatgpt__rpa\auto_job_find\langchain_functions.py", line 1, in from langchain.document_loaders import DirectoryLoader, PyPDFLoader File "H:\anaconda3\lib\site-packages\langchain\document_loaders__init.py", line 18, in from langchain_community.document_loaders.acreom import AcreomLoader File "H:\anaconda3\lib\site-packages\langchain_community\document_loaders\init__.py", line 163, in from langchain_community.document_loaders.pebblo import PebbloSafeLoader File "H:\anaconda3\lib\site-packages\langchain_community\document_loaders\pebblo.py", line 5, in import pwd ModuleNotFoundError: No module named 'pwd'

这个代码中使用了 langchain 这个库,而且根据你之前提供的错误日志,该库中有一些模块尝试导入 pwd,这是一个 Unix-specific 的模块,不在 Windows 系统中可用。因此,如果这些模块是必需的,那么这个代码可能无法在 Windows 上运行。

说实话大佬你这代码不支持windows有点太狗血了哦

Frrrrrrrrank commented 7 months ago

不应该呀,我的就是windows...你试一下不用langchain的版本

digger-yu commented 7 months ago

i have same issue

PS D:\git\auto_job__find__chatgpt__rpa\auto_job_find> & d:/git/auto_job__find__chatgpt__rpa/auto_job_find/.venv/Scripts/python.exe d:/git/auto_job__find__chatgpt__rpa/auto_job_find/write_response.py
Traceback (most recent call last):
  File "d:/git/auto_job__find__chatgpt__rpa/auto_job_find/write_response.py", line 11, in <module>
    from langchain_functions import get_text_chunks, get_vectorstore, read_resumes, should_use_langchain, generate_letter
  File "d:\git\auto_job__find__chatgpt__rpa\auto_job_find\langchain_functions.py", line 1, in <module>
    from langchain.document_loaders import DirectoryLoader, PyPDFLoader
  File "D:\git\auto_job__find__chatgpt__rpa\auto_job_find\.venv\lib\site-packages\langchain\document_loaders\__init__.py", line 18, in <module>
    from langchain_community.document_loaders.acreom import AcreomLoader
  File "D:\git\auto_job__find__chatgpt__rpa\auto_job_find\.venv\lib\site-packages\langchain_community\document_loaders\__init__.py", line 163, in <module>
    from langchain_community.document_loaders.pebblo import PebbloSafeLoader
  File "D:\git\auto_job__find__chatgpt__rpa\auto_job_find\.venv\lib\site-packages\langchain_community\document_loaders\pebblo.py", line 5, in <module>
    import pwd
ModuleNotFoundError: No module named 'pwd'
digger-yu commented 7 months ago

https://github.com/langchain-ai/langchain/issues/17514 可以参考这个

langchain==0.1.6
langchain-community==0.0.19
langchain-core==0.1.23
Frrrrrrrrank commented 7 months ago

问题解决了吗...我没复现成功....我给你加个ask for help 标签吧

Standindust commented 7 months ago

我也是这个问题,然后把langchain的包和代码都删了 直接用另外一个版本 能跑起来

不应该呀,我的就是windows...你试一下不用langchain的版本

Hezhexi2002 commented 7 months ago

image image GPT说的是pwd模块在win下不可用,所以我这里用了getpass模块替代,但是重新运行又又新的错误: image 看起来像是代理问题,但是我使用的moonshot的自定义api,单独curl是没问题的: image image @Frrrrrrrrank 希望大佬能看看是怎么回事(

507402 commented 5 months ago

image imageGPT说的是pwd模块在win下不可用,所以我这里用了getpass模块替代,但是重新运行又新的错误: image 看起来像是代理问题,但是我使用的大胆创新计划的自定义API,单独curl是没问题的: image image 希望大佬能看看是怎么回事(

我觉得你的connection error可能就是代理的问题,没有挂代理就会出现这个报错,或者代理挂的有问题;pwd的错误可以试试在pycharm将python环境更改为本机的环境

loks666 commented 5 months ago

image imageGPT说的是pwd模块在win下不可用,所以我这里用了getpass模块替代,但是重新运行又新的错误: image 看起来像是代理问题,但是我使用的大胆创新计划的自定义API,单独curl是没问题的: image image 希望大佬能看看是怎么回事(

我觉得你的connection error可能就是代理的问题,没有挂代理就会出现这个报错,或者代理挂的有问题;pwd的错误可以试试在pycharm将python环境更改为本机的环境

这问题可以关了,我参照作者的写了一个基于Java的,欢迎使用提出宝贵意见:https://github.com/loks666/get_jobs

loks666 commented 5 months ago

项目运行的时候坑有点多,我参照作者的写了一个基于Java的(支持boss,拉勾,猎聘,智联和51job),欢迎使用提出宝贵意见:https://github.com/loks666/get_jobs