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

Bug #647129 reported by Greg Grossmeier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeya
Fix Committed
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?

Revision history for this message
Greg Grossmeier (greg.grossmeier) wrote :

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)
Changed in zeya:
status: New → Confirmed
status: Confirmed → In Progress
importance: Undecided → High
Phil Sung (psung)
Changed in zeya:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.