Letractively / harvestman-crawler

Automatically exported from code.google.com/p/harvestman-crawler
0 stars 0 forks source link

harvestman --genconfig fails to work with web.py-0.31 #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. download Harvestman-2.0.4beta.tar.gz
2. install it
3. $ harvestman --genconfig

Traceback (most recent call last):
  File "/usr/bin/harvestman", line 8, in <module>
    load_entry_point('HarvestMan==2.0.4betadev', 'console_scripts', 
'harvestman')()
  File "/usr/lib/python2.5/site-packages/HarvestMan-2.0.4betadev-
py2.5.egg/harvestman/apps/spider.py", line 688, in main
    spider.initialize()
  File "/usr/lib/python2.5/site-packages/HarvestMan-2.0.4betadev-
py2.5.egg/harvestman/apps/spider.py", line 435, in initialize
    self.init_config()
  File "/usr/lib/python2.5/site-packages/HarvestMan-2.0.4betadev-
py2.5.egg/harvestman/apps/spider.py", line 421, in init_config
    self.get_options()
  File "/usr/lib/python2.5/site-packages/HarvestMan-2.0.4betadev-
py2.5.egg/harvestman/apps/appbase.py", line 81, in get_options
    objects.config.get_program_options()
  File "/usr/lib/python2.5/site-packages/HarvestMan-2.0.4betadev-
py2.5.egg/harvestman/lib/config.py", line 1493, in get_program_options
    res = self.parse_arguments()
  File "/usr/lib/python2.5/site-packages/HarvestMan-2.0.4betadev-
py2.5.egg/harvestman/lib/config.py", line 1113, in parse_arguments
    from harvestman.tools import genconfig
  File "/usr/lib/python2.5/site-packages/HarvestMan-2.0.4betadev-
py2.5.egg/harvestman/tools/genconfig.py", line 20, in <module>
    from harvestman.lib import gui
  File "/usr/lib/python2.5/site-packages/HarvestMan-2.0.4betadev-
py2.5.egg/harvestman/lib/gui.py", line 16, in <module>
    from web import form, net, request
ImportError: cannot import name request

it seems that autodelegate has been moved to web.__all__.

and it is also necessary to replace `web.run(urls, globals(), 
web.reloader)' with something like:

app = web.application(urls, globals(), autoreload=True)
app.run()

if we want it to work with web.py-0.31

Original issue reported on code.google.com by tchai...@gmail.com on 4 Jan 2009 at 3:45

GoogleCodeExporter commented 8 years ago
ah. just found that harvestman is not compatible with web.py 0.30+ .

the GET and POST methods should *return* the requests instead of *print* them.

see http://webpy.org/docs/0.3/upgrade .

thanks for your great work.

Original comment by tchai...@gmail.com on 4 Jan 2009 at 4:33

GoogleCodeExporter commented 8 years ago
This is fixed in the latest release 2.0.5 beta and in the HarvestMan-lite 
branch of
the trunk. Thank you for reporting this. However the UI (--ui option) still 
doesn't work.

Original comment by abpil...@gmail.com on 11 Feb 2010 at 7:00

GoogleCodeExporter commented 8 years ago
It's not fixed. This is what I get when run harvestman --geconfig:

(harvestmanENV)fantomas@eisenstein:~/234$ harvestman --genconfig
Traceback (most recent call last):
  File "/home/fantomas/234/harvestmanENV/bin/harvestman", line 9, in <module>
    load_entry_point('HarvestMan==2.0.4betadev-r195', 'console_scripts', 'harvestman')()
  File "/home/fantomas/234/harvestmanENV/local/lib/python2.7/site-packages/HarvestMan-2.0.4betadev_r195-py2.7.egg/harvestman/apps/spider.py", line 688, in main
    spider.initialize()
  File "/home/fantomas/234/harvestmanENV/local/lib/python2.7/site-packages/HarvestMan-2.0.4betadev_r195-py2.7.egg/harvestman/apps/spider.py", line 435, in initialize
    self.init_config()
  File "/home/fantomas/234/harvestmanENV/local/lib/python2.7/site-packages/HarvestMan-2.0.4betadev_r195-py2.7.egg/harvestman/apps/spider.py", line 421, in init_config
    self.get_options()
  File "/home/fantomas/234/harvestmanENV/local/lib/python2.7/site-packages/HarvestMan-2.0.4betadev_r195-py2.7.egg/harvestman/apps/appbase.py", line 81, in get_options
    objects.config.get_program_options()
  File "/home/fantomas/234/harvestmanENV/local/lib/python2.7/site-packages/HarvestMan-2.0.4betadev_r195-py2.7.egg/harvestman/lib/config.py", line 1498, in get_program_options
    res = self.parse_arguments()
  File "/home/fantomas/234/harvestmanENV/local/lib/python2.7/site-packages/HarvestMan-2.0.4betadev_r195-py2.7.egg/harvestman/lib/config.py", line 1118, in parse_arguments
    from harvestman.tools import genconfig
  File "/home/fantomas/234/harvestmanENV/local/lib/python2.7/site-packages/HarvestMan-2.0.4betadev_r195-py2.7.egg/harvestman/tools/genconfig.py", line 20, in <module>
    from harvestman.lib import gui
  File "/home/fantomas/234/harvestmanENV/local/lib/python2.7/site-packages/HarvestMan-2.0.4betadev_r195-py2.7.egg/harvestman/lib/gui.py", line 16, in <module>
    from web import form, net, request
ImportError: cannot import name request

Also, I don't get how to use HarvestMan. On the usage page there is a 
screenshot of a web browser window opened on localhost:5940 without any 
information what and how to run this daemon. 

Also, if this project is not supported anymore, please make appropriate 
announce.

Ubuntu 12.04 here.

Original comment by anega...@gmail.com on 13 Feb 2014 at 4:51