peterbe / mincss

Tool for finding out which CSS selectors you're NOT using.
https://peterbe.github.io/mincss/
BSD 3-Clause "New" or "Revised" License
855 stars 92 forks source link

Setup issue #18

Closed anthonykozak closed 10 years ago

anthonykozak commented 10 years ago

Hi ! I need some help to figure out a basic error. I just installed python on ubuntu like so : apt-get install python python-lxml python-cssselect python-setuptools then installed mincss : python setup.py install

I edited run_mincss to set my own URL. Then I launched : python run_mincss

and I had this error :

Traceback (most recent call last): File "run_mincss", line 38, in run() File "run_mincss", line 10, in run p.process(URL) File "/usr/local/lib/python2.7/dist-packages/mincss-0.8.1-py2.7.egg/mincss/processor.py", line 122, in process processed = self._process_content(content, self._bodies) File "/usr/local/lib/python2.7/dist-packages/mincss-0.8.1-py2.7.egg/mincss/processor.py", line 321, in _process_content assert old in content AssertionError

Did I missed something ? What can I do to fix that ? best regards, Anthony

peterbe commented 10 years ago

What is run_mincss?

anthonykozak commented 10 years ago

this script is in the example/ folder. But it's the same if I use : python run.py "http://MY_URL"

the script is actually working for some url but crashing most of the time : python run.py "http://www.hello.com" python run.py "http://www.bonjour.com"

any idea ?

peterbe commented 10 years ago

The example all run_mincss doesn't take any parameters. It is hardcoded to open only http://localhost:9000/page.html.

This works:

# in one terminal
$ cd example
$ ./run_server
# in another terminal
$ cd example
$ ./run_mincss