#124 closed defect

poor handling of user error: pasting a dirnode uri into the "get file" field of the wui — at Initial Version

Reported by: zooko Owned by: nobody
Priority: major Milestone: 0.6.0
Component: code Version: 0.5.1
Keywords: Cc:
Launchpad Bug:

Description

If you paste a dirnode uri into the "URI of file to download" field, you'll get:

An error occurred rendering the requested page. Additionally, an error occured rendering the error page.

The twistd.log contains:

          File "/Users/wonwinmcbrootles/playground/allmydata/tahoe/instdir/lib/allmydata/vdrive.py", line 128, in get_node
            node_uri = IURI(node_uri)
            # node_uri = "' URI:DIR:pb://xextf3eap44o3wi27mf7ehiur6wvhzr6@207.7.153.180:56677,127.0.0.1:56677/vdrive:y1obs85cazf
aa8uyd8mb1u8esw'"
            # IURI = '<InterfaceClass allmydata.interfaces.IURI>'
          File "/lib/python2.5/site-packages/zope/interface/interface.py", line 697, in __call__
            
          File "/lib/python2.5/site-packages/zope/interface/interface.py", line 765, in __adapt__
            
          File "/usr/local/stow/Twisted-2.5.0/lib/python2.5/site-packages/twisted/python/components.py", line 113, in _hook
            return factory(ob)
            # ob = "' URI:DIR:pb://xextf3eap44o3wi27mf7ehiur6wvhzr6@207.7.153.180:56677,127.0.0.1:56677/vdrive:y1obs85cazfaa8uyd
8mb1u8esw'"
          File "/Users/wonwinmcbrootles/playground/allmydata/tahoe/instdir/lib/allmydata/uri.py", line 205, in from_string
            raise RuntimeError("unknown URI type: %s.." % s[:10])
            # RuntimeError = "<type 'exceptions.RuntimeError'>"
            # s = "' URI:DIR:pb://xextf3eap44o3wi27mf7ehiur6wvhzr6@207.7.153.180:56677,127.0.0.1:56677/vdrive:y1obs85cazfaa8uyd8
mb1u8esw'"
        exceptions.RuntimeError: unknown URI type:  URI:DIR:p..

and

          File "/usr/local/lib/python2.5/site-packages/nevow/appserver.py", line 82, in processingFailed
            handler.renderHTTP_exception(ctx, reason)
          File "/usr/local/lib/python2.5/site-packages/nevow/appserver.py", line 57, in renderHTTP_exception
            result = failure.formatFailure(reason)
            # reason = <twisted.python.failure.Failure <type 'exceptions.RuntimeError'>>
          File "/usr/local/stow/Nevow-0.9.18/lib/python2.5/site-packages/nevow/failure.py", line 248, in formatFailure
            for method, filename, lineno, localVars, globalVars in myFailure.frames:
            # myFailure = <twisted.python.failure.Failure <type 'exceptions.RuntimeError'>>

Change History (0)

Note: See TracTickets for help on using tickets.