TypeError: walk() got an unexpected keyword argument 'followlinks'

Bug #647129 reported by Greg Grossmeier on 2010-09-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeya
High
Unassigned

Bug Description

Latest (from git) Zeya requires python2.6, crashes with 2.5.

greg@rose:~/src/projects/zeya/dev$ ./zeya.py --path=/home/greg/Media/Music/ --port=5678 --basic_auth_file=/home/greg/src/dotfiles/zeya-htpasswd
Using 'dir' backend.
Scanning for music in '/home/greg/Media/Music'...
Traceback (most recent call last):
  File "./zeya.py", line 398, in <module>
    backend = get_backend(backend_type)
  File "./zeya.py", line 314, in get_backend
    return DirectoryBackend(path)
  File "/home/greg/src/projects/zeya/dev/directory.py", line 65, in __init__
    self.setup_db()
  File "/home/greg/src/projects/zeya/dev/directory.py", line 75, in setup_db
    self.fill_db(previous_db)
  File "/home/greg/src/projects/zeya/dev/directory.py", line 172, in fill_db
    for path, dirs, files in os.walk(self._media_path, followlinks=True):
TypeError: walk() got an unexpected keyword argument 'followlinks'

When I delete the "followlinks=True" argument from line 172 it runs fine.

Maybe to keep Zeya compatible with older pythons there could be a test of which version of python is being used, and call os.walk accordingly?

This is a simple fix to test what version of python is being used and call os.walk() accordingly. It works for me, but others testing it would be greatly appreciated.

Phil Sung (psung) on 2010-10-05
Changed in zeya:
status: New → Confirmed
status: Confirmed → In Progress
importance: Undecided → High
Phil Sung (psung) on 2010-10-06
Changed in zeya:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers