Ask Your Question
0

unicode decode error when downloading zip-file

asked 2015-05-18 11:33:24 +0200

simo gravatar image

Tried to Download worksheet files from my sage notebook in my Ubuntu 14.04 and got the following error messages. Any idea how to fix the problem?

Found the reason to the problem: it's an UniCodeError as follows.

2015-05-17 19:07:57+0300 [HTTPChannel,88,127.0.0.1] Starting zipping a group of worksheets in a separate thread... 2015-05-17 19:07:59+0300 [-] WSGI application error Traceback (most recent call last): File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-i686.egg/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, args, kwargs) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-i686.egg/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, *kw) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-i686.egg/twisted/python/context.py", line 81, in callWithContext return func(args,kw) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-i686.egg/twisted/web/wsgi.py", line 332, in run self.reactor.callFromThread(wsgiError, self.started, *exc_info()) --- <exception caught="" here=""> --- File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-i686.egg/twisted/web/wsgi.py", line 315, in run appIterator = self.application(self.environ, self.startResponse) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1836, in __call__ return self.wsgi_app(environ, start_response) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) File "/home/simo/Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request return self.view_functionsrule.endpoint File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/sagenb-0.11.1-py2.7.egg/sagenb/flask_version/decorators.py", line 22, in wrapper return f(args, **kwds) File "/home/.../Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/sagenb-0.11.1-py2.7.egg/sagenb/flask_version/worksheet_listing.py", line 214, in download_worksheets ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-05-18 15:51:00 +0200

kcrisman gravatar image

This could be a problem in your path, conceivably - see this answer.

Otherwise it's likely that there are some unusual characters elsewhere (in your title?) causing the problem... the last command there both reads and writes a file. Giving us more information about the exact setup, path, titles etc. would help diagnose this.

edit flag offensive delete link more

Comments

Python 2.7.6 (default, Mar 22 2014, 22:59:38) [GCC 4.8.2] on linux2 is installed in the following folders: /etc/python2.7/sitecustomize.py /etc/python/debian_conf /usr/include/ and /usr/include/boost /usr/share and /usr/local /usr/lib and /usr/lib/debug/usr/lib /var/lib/python (/python3.2 ... 3.4_installed) ipython is in folders /usr/share and /home(/.ipython)

simo gravatar imagesimo ( 2015-05-18 21:15:49 +0200 )edit

Sage installation directory: /home/simo/Sage/sage-6.4.1-i686-Linux$ (ls -a) . build configure.ac .gitignore Makefile src .. config COPYING.txt local README.txt VERSION.txt bootstrap configure .git m4 sage Sage app(?) directory: /home/simo/.sage$ (ls -a) . db ipython-2.1.0 matplotlib-1.3.1 temp .. gp-expect.log ipython-2.3.0 .python-eggs cache ipython-0.12 matplotlib-1.2.1 sage_notebook.sagenb

simo gravatar imagesimo ( 2015-05-18 21:16:42 +0200 )edit

When starting notebook, the following messages are shown in terminal:

sage: notebook() The notebook files are stored in: sage_notebook.sagenb ┌────────────────────────────────────────────────┐ │ │ │ Open your web browser to http://localhost:8080 │ │ │ └────────────────────────────────────────────────┘ Executing twistd --pidfile="sage_notebook.sagenb/sagenb.pid" -ny "sage_notebook.sagenb/twistedconf.tac" /home/simo/Sage/sage-6.4.1-i686-Linux/local/lib/python2.7/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. _warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to a

simo gravatar imagesimo ( 2015-05-18 21:18:48 +0200 )edit

avoid timing attack vulnerability. _warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) 2015-05-18 21:44:07+0300 [-] Log opened. 2015-05-18 21:44:07+0300 [-] twistd 14.0.2 (/home/simo/Sage/sage-6.4.1-i686-Linux/local/bin/python 2.7.8) starting up. 2015-05-18 21:44:07+0300 [-] reactor class: twisted.internet.epollreactor.EPollReactor. 2015-05-18 21:44:08+0300 [-] QuietSite starting on 8080 2015-05-18 21:44:08+0300 [-] Starting factory <__builtin__.QuietSite instance at 0xacf8072c> [6764:6764:0518/214434:ERROR:url_pattern_set.cc(240)] Invalid url pattern: chrome://print/* [6764:6764:0518/214452:ERROR:account_tracker.cc(306)] OnGetTokenFailure: Invalid credentials. [6764:6764:0518/214452:ERROR:account_tracker.cc(30

simo gravatar imagesimo ( 2015-05-18 21:20:14 +0200 )edit

6)] OnGetTokenFailure: Invalid credentials.

[6764:6861:0518/214549:ERROR:get_updates_processor.cc(240)] PostClientToServerMessage() failed during GetUpdates

Worksheets are opened in the browser normally without any problems.

My worksheet are done/saved in sage-format. They don't contain any special characters (language US-en). They contain plots. The worksheet names are for example "Impulses", "Astrea Polars", "Production node equations" etc.

simo gravatar imagesimo ( 2015-05-18 21:24:24 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-18 11:33:24 +0200

Seen: 523 times

Last updated: May 18 '15