[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #29495 [Webpages/Website]: Running site fails with python 2.x



#29495: Running site fails with python 2.x
------------------------------+----------------------
 Reporter:  atagar            |          Owner:  hiro
     Type:  defect            |         Status:  new
 Priority:  Medium            |      Milestone:
Component:  Webpages/Website  |        Version:
 Severity:  Normal            |     Resolution:
 Keywords:                    |  Actual Points:
Parent ID:                    |         Points:
 Reviewer:                    |        Sponsor:
------------------------------+----------------------

Comment (by atagar):

 Uggg. I got more errors running the site with python2 so finally gave up
 and reinstalled lektor with python3. Unfortunately the 'b' I added in the
 open call broke the site for python3...

 {{{
 Traceback (most recent call last):
   File "/home/atagar/.local/lib/lektor/lib/python3.5/site-
 packages/lektor/devserver.py", line 47, in build
     builder.build_all()
   File "/home/atagar/.local/lib/lektor/lib/python3.5/site-
 packages/lektor/builder.py", line 1141, in build_all
     prog, build_state = self.build(source, path_cache=path_cache)
   File "/home/atagar/.local/lib/lektor/lib/python3.5/site-
 packages/lektor/builder.py", line 1110, in build
     source=source, prog=prog)
   File "/home/atagar/.local/lib/lektor/lib/python3.5/site-
 packages/lektor/pluginsystem.py", line 161, in emit
     rv[plugin.id] = handler(**kwargs)
   File "/home/atagar/Desktop/tor/tpo/packages/i18n/lektor_i18n.py", line
 350, in on_before_build
     f.write(content)
 TypeError: a bytes-like object is required, not 'str'
 }}}

 I would suggest that rather than this patch we simply abort if the user is
 running python2. The site fails a few different, confusing ways so better
 to say upfront 'please run python3' rather than suggest that we support
 both python versions.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29495#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs