[Twisted-Python] Dropin.cache errors after clean install of twisted-8.2.0
Alex Clemesha
clemesha at gmail.com
Wed Jun 17 16:41:44 EDT 2009
Hi,
Just type "sudo twistd" and the errors will go away.
(You may already know of this work-around)
I agree with you that it would be nice for these to never show up in
the first place.
I looked at the ticket you mention, but it seems that the cleaner solution
would be to resolve these issues at install/upgrade time.
-Alex
On Wed, Jun 17, 2009 at 12:47 PM, Rutt, Benjamin<Benjamin.Rutt at gs.com> wrote:
> I recently installed python-2.6.1 and then twisted-8.2.0 (outside of the
> python tree). One of my users is complaining that when he uses trial to
> test some twisted programs, although his test passes, he has to stare at a
> stack trace like this which mentions dropin.cache.new failing to be written:
>
> $ cat foo.py
> #!/sw/external/python-2.6.1/bin/python
>
> from twisted.trial import unittest
>
> class MyTestClass(unittest.TestCase):
> def test_foobar(self):
> print 'hello, world!'
> self.failUnless(1 == 1)
> $ /sw/external/twisted-8.2.0/bin/trial ./foo.py
> /sw/external/twisted-8.2.0/lib/python/twisted/persisted/sob.py:12:
> DeprecationWarning: the md5 module is deprecated; use hashlib instead
>
> import os, md5, sys
> /sw/external/twisted-8.2.0/lib/python/twisted/python/filepath.py:12:
> DeprecationWarning: the sha module is deprecated; use the hashlib module
> instead
>
> import sha
> /sw/external/twisted-8.2.0/lib/python/twisted/web/microdom.py:181:
> SyntaxWarning: assertion is always true, perhaps remove parentheses?
>
> assert (oldChild.parentNode is self,
> Traceback (most recent call last):
> File "/sw/external/twisted-8.2.0/lib/python/twisted/python/usage.py", line
> 241, in parseOptions
> self.postOptions()
> File "/sw/external/twisted-8.2.0/lib/python/twisted/scripts/trial.py",
> line 293, in postOptions
> self['reporter'] = self._loadReporterByName(self['reporter'])
> File "/sw/external/twisted-8.2.0/lib/python/twisted/scripts/trial.py",
> line 279, in _loadReporterByName
> for p in plugin.getPlugins(itrial.IReporter):
> File "/sw/external/twisted-8.2.0/lib/python/twisted/plugin.py", line 200,
> in getPlugins
> allDropins = getCache(package)
> --- <exception caught here> ---
> File "/sw/external/twisted-8.2.0/lib/python/twisted/plugin.py", line 179,
> in getCache
> dropinPath.setContent(pickle.dumps(dropinDotCache))
> File "/sw/external/twisted-8.2.0/lib/python/twisted/python/filepath.py",
> line 623, in setContent
> f = sib.open('w')
> File "/sw/external/twisted-8.2.0/lib/python/twisted/python/filepath.py",
> line 433, in open
> return open(self.path, mode+'b')
> exceptions.IOError: [Errno 30] Read-only file system:
> '/sw/external/twisted-8.2.0/lib/python/twisted/plugins/dropin.cache.new'
>
> foo
> MyTestClass
> test_foobar ... hello, world!
> [OK]
>
> -------------------------------------------------------------------------------
> Ran 1 tests in 0.023s
>
> PASSED (successes=1)
>
> I would consider this to be an install bug. Evidently, trial uses plugins,
> which upon reading
> http://twistedmatrix.com/projects/core/documentation/howto/plugin.html#auto3
> I find that plugins need up-to-date dropin.cache files to be built, or else
> they'll be built dynamically; the latter step fails in my case due to my
> site-wide install being on a read-only directory. The docs say "when
> installing or removing software which provides Twisted plugins, the site
> administrator should be sure the cache is regenerated"; however all I did
> was install twisted itself, not any specific plugins. All I did to install
> twisted was 'python setup.py install --home=...' and at no later point did I
> ever add new plugins to it. Why can't the install take care of initial
> dropin.cache generation for me?
>
> I see a related issue http://twistedmatrix.com/trac/ticket/2409.
>
> Regardless of whether ticket 2409 goes anywhere, should I raise an issue
> that the install should really take care of initial dropin.cache generation,
> much like python install takes care of std lib .py->.pyc generation?
>
> Thanks.
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
--
Alex Clemesha
clemesha.org
More information about the Twisted-Python
mailing list