eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.46k stars 314 forks source link

cactus serve fails in py3 #237

Closed ibarria0 closed 8 years ago

ibarria0 commented 8 years ago

Cloned from repo and tried serving site. Seems like its trying to decode unicode since its on python3.

bacon@neptune:~/websites/spearfishing$ cactus serve
Running webserver at http://127.0.0.1:8000 for /home/bacon/websites/spearfishing/.build
Type control-c to exit
Traceback (most recent call last):
  File "/usr/local/bin/cactus", line 9, in <module>
    load_entry_point('Cactus==3.3.2', 'console_scripts', 'cactus')()
  File "/usr/local/lib/python3.4/dist-packages/cactus/cli.py", line 159, in cli_entrypoint
    main(sys.argv[1:])
  File "/usr/local/lib/python3.4/dist-packages/cactus/cli.py", line 155, in main
    ns.target(**kwargs)
  File "/usr/local/lib/python3.4/dist-packages/cactus/cli.py", line 65, in serve
    site.serve(port=port, browser=browser)
  File "/usr/local/lib/python3.4/dist-packages/cactus/site.py", line 449, in serve
    self.server = WebServer(self.build_path, port=port)
  File "/usr/local/lib/python3.4/dist-packages/cactus/server.py", line 85, in __init__
    self.path = path.decode("utf-8")
AttributeError: 'str' object has no attribute 'decode
krallin commented 8 years ago

Thanks! This is fixed in 3.3.3