第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

main.py文件在ssh里面可以執(zhí)行,但是到了pycharm就不行了

我的main.py文件
from?scrapy?import?cmdline
cmdline.execute('scrapy?crawl?douban_spider'.split())

我的報(bào)錯(cuò)信息:

ssh://crow@192.168.150.128:22/usr/bin/python3 -u /home/crow/demon-lab/douban/douban/main.py

Traceback (most recent call last):

? File "/home/crow/demon-lab/douban/douban/main.py", line 2, in <module>

? ? cmdline.execute('scrapy crawl douban_spider'.split())

? File "/usr/local/lib/python3.5/dist-packages/scrapy/cmdline.py", line 110, in execute

? ? settings = get_project_settings()

? File "/usr/local/lib/python3.5/dist-packages/scrapy/utils/project.py", line 68, in get_project_settings

? ? settings.setmodule(settings_module_path, priority='project')

? File "/usr/local/lib/python3.5/dist-packages/scrapy/settings/__init__.py", line 292, in setmodule

? ? module = import_module(module)

? File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module

? ? return _bootstrap._gcd_import(name[level:], package, level)

? File "<frozen importlib._bootstrap>", line 986, in _gcd_import

? File "<frozen importlib._bootstrap>", line 969, in _find_and_load

? File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked

ImportError: No module named 'douban.settings'

Process finished with exit code 1


正在回答

1 回答

在python 代碼中加入

```
sys.path.append(os.path.abspath(os.path.join(os.getcwd(), "..")))? # 當(dāng)前項(xiàng)目路徑加入
```

可嘗試解決辦法:

配置文件的工作路徑 ? working directory

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

main.py文件在ssh里面可以執(zhí)行,但是到了pycharm就不行了

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)