vicety / Pixiv-Crawler

Scrapy框架下的pixiv多功能爬虫
GNU General Public License v3.0
48 stars 12 forks source link

ImportError: No module named utils.PixivError #6

Closed Hikari1nVoid closed 6 years ago

Hikari1nVoid commented 6 years ago

RT. I really DON'T KNOW where this module belongs to.

vicety commented 6 years ago

PixivError is defined at ./pixiv_beta/PixivError.py I ran it but the problem you mentioned did not occur. I suppose nothing wrong would happen if you just run "python main.py" in the root directory. To help fix it, could you show you complete log?

Hikari1nVoid commented 6 years ago

Ok it solved....I used python2.7 but another problem encountered while executing main.py. Traceback (most recent call last): File "main.py", line 14, in <module> main() File "main.py", line 9, in main execute(["scrapy", "crawl", "pixivSpider"]) File "/usr/local/lib/python3.7/site-packages/scrapy/cmdline.py", line 150, in execute _run_print_help(parser, _run_command, cmd, args, opts) File "/usr/local/lib/python3.7/site-packages/scrapy/cmdline.py", line 90, in _run_print_help func(*a, **kw) File "/usr/local/lib/python3.7/site-packages/scrapy/cmdline.py", line 157, in _run_command cmd.run(args, opts) File "/usr/local/lib/python3.7/site-packages/scrapy/commands/crawl.py", line 57, in run self.crawler_process.crawl(spname, **opts.spargs) File "/usr/local/lib/python3.7/site-packages/scrapy/crawler.py", line 170, in crawl crawler = self.create_crawler(crawler_or_spidercls) File "/usr/local/lib/python3.7/site-packages/scrapy/crawler.py", line 198, in create_crawler return self._create_crawler(crawler_or_spidercls) File "/usr/local/lib/python3.7/site-packages/scrapy/crawler.py", line 203, in _create_crawler return Crawler(spidercls, self.settings) File "/usr/local/lib/python3.7/site-packages/scrapy/crawler.py", line 55, in __init__ self.extensions = ExtensionManager.from_crawler(self) File "/usr/local/lib/python3.7/site-packages/scrapy/middleware.py", line 58, in from_crawler return cls.from_settings(crawler.settings, crawler) File "/usr/local/lib/python3.7/site-packages/scrapy/middleware.py", line 34, in from_settings mwcls = load_object(clspath) File "/usr/local/lib/python3.7/site-packages/scrapy/utils/misc.py", line 44, in load_object mod = import_module(module) File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/usr/local/lib/python3.7/site-packages/scrapy/extensions/telnet.py", line 12, in <module> from twisted.conch import manhole, telnet File "/usr/local/lib/python3.7/site-packages/twisted/conch/manhole.py", line 154 def write(self, data, async=False): ^ SyntaxError: invalid syntax [root@instance-6 Pixiv-Crawler]#

vicety commented 6 years ago

It seems like there's a syntax error in the package named Twisted. I'm not clear why this would happen, reinstall the Twisted or try python 3.6 may help. BTW, since we are both Chinese(and touhou fan……), It would be better if we use Chinese...

Hikari1nVoid commented 6 years ago

well... 算了弃坑,搞了台win小鸡慢慢扒了。 这编码太皮了。