Opened 16 years ago
Last modified 10 years ago
#4109 new defect
AttributeError: 'module' object has no attribute 'mknod'
Reported by: | thesorcerer | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | SvnsyncPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Hi,
I get this error when I try to use svnsync-plugin on XP
Python Traceback Most recent call last:
- File "C:\Python25\Lib\site-packages\trac\web\main.py", line 432, in _dispatch_request
Code fragment:
- try:
- if not env and env_error:
- raise HTTPInternalError(env_error)
- try:
- dispatcher = RequestDispatcher(env)
- dispatcher.dispatch(req)
- except RequestDone:
- pass
- resp = req._response or []
- except HTTPException, e:
Python25
Lib
site-packages
trac
web
main.py' frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ... has_admin True line u' dispatcher.dispatch(req)' lineno 431 message u"AttributeError: 'module' object has no attribute 'mknod'" req <Request "GET u'/report'"> resp [] tb <traceback object at 0x01695148> tb_hide None traceback 'Traceback (most recent call last):\n File ... - File "C:\Python25\Lib\site-packages\trac\web\main.py", line 174, in dispatch
Code fragment:
- if not req.path_info or req.path_info == '/':
- chosen_handler = self.default_handler
- # pre-process any incoming request, whether a handler
- # was found or not
- chosen_handler = self._pre_process_request(req,
- chosen_handler)
- except TracError, e:
- raise HTTPInternalError(e)
- if not chosen_handler:
- if req.path_info.endswith('/'):
- # Strip trailing / and redirect
- File "C:\Python25\Lib\site-packages\trac\web\main.py", line 295, in _pre_process_request
Code fragment:
- req.outcookietrac_form_token?secure? = True
- return req.outcookietrac_form_token?.value
- def _pre_process_request(self, req, chosen_handler):
- for filter_ in self.filters:
- chosen_handler = filter_.pre_process_request(req, chosen_handler)
- return chosen_handler
- def _post_process_request(self, req, *args):
- nbargs = len(args)
- resp = args
- File "C:\Python25\Lib\site-packages\trac\versioncontrol\api.py", line 86, in pre_process_request
Code fragment:
- def pre_process_request(self, req, handler):
- from trac.web.chrome import Chrome, add_warning
- if handler is not Chrome(self.env):
- try:
- self.get_repository(req.authname).sync()
- except TracError, e:
- add_warning(req, _("Can't synchronize with the repository "
- "(%(error)s). Look in the Trac log for more "
- "information.", error=e.message)) 91.
- File "C:\Python25\Lib\site-packages\trac\versioncontrol\api.py", line 157, in get_repository
Code fragment:
- repos = self._cache[tid]
- else:
- rtype, rdir = self.repository_type, self.repository_dir
- if not os.path.isabs(rdir):
- rdir = os.path.join(self.env.path, rdir)
- repos = self._connector.get_repository(rtype, rdir, authname)
- self._cache[tid] = repos
- return repos
- finally:
- self._lock.release()
ETAP_svnsyncrep' repos_type 'svnsync' rtype u'svnsync' self <trac.versioncontrol.api.RepositoryManager object at 0x0167E9B0> tid 2508 - File "c:\python25\lib\site-packages\svnsyncplugin-0.1.2-py2.5.egg\svnsyncplugin\svnsyncplugin.py", line 35, in get_repository
Code fragment:
- def get_repository(self, repos_type, repos_dir, authname):
- assert repos_type == 'svnsync'
- # sync the repository
- directory = self.env.config.get('trac', 'repository_dir')
- svnsync.sync(directory, self.repository_url, logger=self.env.log.info)
- repos = SubversionRepository(repos_dir, None, self.log)
- return repos 39.
- ### methods particular to SvnsyncConnector
ETAP_svnsyncrep' repos_dir u'C:
ETAP_svnsyncrep' repos_type u'svnsync' self <svnsyncplugin.svnsyncplugin.SvnsyncConnector object at 0x0144B850> - File "c:\python25\lib\site-packages\svnsyncplugin-0.1.2-py2.5.egg\svnsyncplugin\svnsync.py", line 82, in sync
Code fragment:
- if logger:
- logger('repository changed! %s -> %s' % (url, repository.strip()))
- logger('resyncing to new repository')
- import shutil
- shutil.rmtree(directory)
- sync(directory, repository, username, logger=logger)
- return sh('svnsync', 'sync', repo, logger=logger)
- if name == 'main':
- import optparse
ETAP_svnsyncrep' logger <bound method Logger.info of <logging.Logger instance at 0x011FC3F0>> propget (, "svn: Unable to open an ra_local session to URL\r\nsvn: Unable to ... repo u'file:///C:/ETAP_svnsyncrep' repository u'P:
ETAP_TDP1_2
.repository' shutil <module 'shutil' from 'C:\Python25\lib\shutil.pyc'> url username 'svnsync' - File "c:\python25\lib\site-packages\svnsyncplugin-0.1.2-py2.5.egg\svnsyncplugin\svnsync.py", line 66, in sync
Code fragment:
- def sync(directory, repository, username='svnsync', logger=None):
- # create the mirror if it doesn't exist
- if not os.path.exists(directory):
- retval = create(directory, repository, username, logger=logger)
- if retval[-1] != 0:
- return retval
- repo = file_uri(directory)
ETAP_svnsyncrep' logger <bound method Logger.info of <logging.Logger instance at 0x011FC3F0>> repository u'P:
ETAP_TDP1_2
.repository' username 'svnsync' - File "c:\python25\lib\site-packages\svnsyncplugin-0.1.2-py2.5.egg\svnsyncplugin\svnsync.py", line 49, in create
Code fragment:
- filename = 'pre-revprop-change'
- if os in windows:
- filename += '.bat'
- filename = os.path.join(directory, 'hooks', filename)
- os.mknod(filename, 0770)
- f = file(filename, 'w')
- if os in windows:
- print >> f,
- else:
- print >> f, '#!/bin/sh'
ETAP_svnsyncrep' filename u'C:
ETAP_svnsyncrep
hooks
pre-revprop-change' logger <bound method Logger.info of <logging.Logger instance at 0x011FC3F0>> repository u'P:
ETAP_TDP1_2
.repository' username 'svnsync'
File "C:\Python25\Lib\site-packages\trac\web\main.py", line 432, in _dispatch_request
dispatcher.dispatch(req)
File "C:\Python25\Lib\site-packages\trac\web\main.py", line 174, in dispatch
chosen_handler)
File "C:\Python25\Lib\site-packages\trac\web\main.py", line 295, in _pre_process_request
chosen_handler = filter_.pre_process_request(req, chosen_handler)
File "C:\Python25\Lib\site-packages\trac\versioncontrol\api.py", line 86, in pre_process_request
self.get_repository(req.authname).sync()
File "C:\Python25\Lib\site-packages\trac\versioncontrol\api.py", line 157, in get_repository
repos = self._connector.get_repository(rtype, rdir, authname)
File "c:\python25\lib\site-packages\svnsyncplugin-0.1.2-py2.5.egg\svnsyncplugin\svnsyncplugin.py", line 35, in get_repository
svnsync.sync(directory, self.repository_url, logger=self.env.log.info)
File "c:\python25\lib\site-packages\svnsyncplugin-0.1.2-py2.5.egg\svnsyncplugin\svnsync.py", line 82, in sync
sync(directory, repository, username, logger=logger)
File "c:\python25\lib\site-packages\svnsyncplugin-0.1.2-py2.5.egg\svnsyncplugin\svnsync.py", line 66, in sync
retval = create(directory, repository, username, logger=logger)
File "c:\python25\lib\site-packages\svnsyncplugin-0.1.2-py2.5.egg\svnsyncplugin\svnsync.py", line 49, in create
os.mknod(filename, 0770)
System Information: Trac: 0.11.2 Python: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] setuptools: 0.6c9 SQLite: 3.3.4 pysqlite: 2.3.2 Genshi: 0.5 Pygments: 0.11.1 jQuery: 1.2.6
Attachments (0)
Change History (6)
comment:1 Changed 16 years ago by
comment:3 Changed 16 years ago by
Any additional info I could provide or anything I should check or test?
comment:5 Changed 16 years ago by
Replying to thesorcerer:
Any hints on this topic?
I haven't had a chance to look into it yet. There may be a workaround for windows, but I haven't investigated.
comment:6 Changed 10 years ago by
Owner: | Jeff Hammel deleted |
---|
The problem seems to be os.mknod, but this should be available for Python 2.5.
Or is this a Windows issue?