AttributeError: 'FileUpload' object has no attribute 'value'
Hello, What could be the cause for this error, please? I've created an empty /data/ directory, for the sake or trying to identify what is going on. Before it was giving another error, but now it is giving attribute error. So I guess it should be some regression, perhaps? Maybe caused by some dependency? *Logfile* Listening on http://pypi.localdomain:3141/ Hit Ctrl-C to quit. 2014-02-17 16:08:44,077 [DEBUG] requests.packages.urllib3.connectionpool: "POST /pypi/ HTTP/1.1" 200 None 2014-02-17 16:09:13,276 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 2014-02-17 16:09:13,277 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 2014-02-17 16:09:13,280 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 2014-02-17 16:09:13,281 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 192.168.3.131 - - [17/Feb/2014 16:09:13] "GET /root/pypi/+api HTTP/1.1" 200 336 192.168.3.131 - - [17/Feb/2014 16:09:17] "POST /+login HTTP/1.1" 200 229 2014-02-17 16:09:43,382 [INFO ] devpi_server.db: setting password for user 'rgomes' 2014-02-17 16:09:43,383 [INFO ] devpi_server.db: created user 'rgomes' with email None 192.168.3.131 - - [17/Feb/2014 16:09:43] "PUT /rgomes HTTP/1.1" 201 72 2014-02-17 16:09:44,091 [DEBUG] devpi_server.extpypi: querying pypi changelog since 1002291 2014-02-17 16:09:44,093 [INFO ] requests.packages.urllib3.connectionpool: Resetting dropped connection: pypi.python.org 2014-02-17 16:09:44,415 [DEBUG] requests.packages.urllib3.connectionpool: "POST /pypi/ HTTP/1.1" 200 None 2014-02-17 16:09:44,421 [DEBUG] devpi_server.extpypi: processed changelog of size 3: set(['streamcorpus_pipeline']) 192.168.3.131 - - [17/Feb/2014 16:09:53] "POST /+login HTTP/1.1" 200 231 2014-02-17 16:10:03,487 [DEBUG] devpi_server.views: got auth status u'ok' for user u'rgomes' 2014-02-17 16:10:03,490 [INFO ] devpi_server.db: created index rgomes/dev: {u'volatile': True, u'acl_upload': [u'rgomes'], u'bases': (u'root/pypi',), u'type': u'stage', u'uploadtrigger_jenkins': None} 192.168.3.131 - - [17/Feb/2014 16:10:03] "PUT /rgomes/dev HTTP/1.1" 200 211 192.168.3.131 - - [17/Feb/2014 16:10:03] "GET /rgomes/dev HTTP/1.1" 200 211 192.168.3.3 - - [17/Feb/2014 16:10:14] "POST /+login HTTP/1.1" 200 231 2014-02-17 16:10:18,568 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 2014-02-17 16:10:18,569 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 2014-02-17 16:10:18,573 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 2014-02-17 16:10:18,574 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 2014-02-17 16:10:18,575 [DEBUG] devpi_server.views: outside host header: http://pypi.localdomain:3141/ 192.168.3.3 - - [17/Feb/2014 16:10:18] "GET /rgomes/dev/+api HTTP/1.1" 200 403 2014-02-17 16:10:24,652 [DEBUG] devpi_server.views: got auth status u'ok' for user u'rgomes' 2014-02-17 16:10:24,663 [DEBUG] devpi_server.views: metadata in form: [('comment', ''), ('license', 'PSF'), ('protcol_version', '1'), ('metadata_version', '1.0'), ('author', 'Marc Brinkmann'), ('home_page', 'http://github.com/mbr/shutilwhich'), ('md5_digest', 'd004a0a28147862f1bfab1a2cd5447fc'), ('filetype', 'sdist'), (':action', 'file_upload'), ('download_url', 'UNKNOWN'), ('summary', 'shutil.which for those not using Python 3.3 yet.'), ('platform', 'UNKNOWN'), ('version', '1.0.1'), ('pyversion', ''), ('description', "A copy & paste backport of Python 3.3's ``shutil.which`` function.\n\nUsage\n=====\n\n* Install this package: ``pip install shutilwhich``\n* Import like this: ``import shutilwhichh``. This will monkeypatch ``shutil``\n if there is no ``shutil.which`` method, otherwise leave it alone.\n"), ('author_email', 'g...@marcbrinkmann.de'), ('name', 'shutilwhich')] 2014-02-17 16:10:24,667 [DEBUG] devpi_server.extpypi: visiting index https://pypi.python.org/simple/shutilwhich/ 2014-02-17 16:10:24,670 [INFO ] requests.packages.urllib3.connectionpool: Starting new HTTPS connection (1): pypi.python.org 2014-02-17 16:10:24,886 [DEBUG] requests.packages.urllib3.connectionpool: "GET /simple/shutilwhich/ HTTP/1.1" 200 245 2014-02-17 16:10:24,888 [DEBUG] devpi_server.extpypi: shutilwhich: got response with serial 799517 2014-02-17 16:10:24,889 [DEBUG] devpi_server.extpypi: adding link <URL 'https://pypi.python.org/packages/source/s/shutilwhich/shutilwhich-1.0.1.tar.gz#md5=356649a25a4c0108cecb70c04d7f5145'> 2014-02-17 16:10:24,890 [DEBUG] devpi_server.extpypi: adding link <URL 'https://pypi.python.org/packages/source/s/shutilwhich/shutilwhich-1.0.tar.gz#md5=96b9b21cd65b5879d098dea7e4e9a1a9'> Traceback (most recent call last): File "/opt/cpython/2.7.6/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/home/rgomes/.virtualenvs/py276/bin/bottle.py", line 979, in __call__ return self.wsgi(environ, start_response) File "/home/rgomes/.virtualenvs/py276/bin/bottle.py", line 954, in wsgi out = self._cast(self._handle(environ)) File "/home/rgomes/.virtualenvs/py276/bin/bottle.py", line 862, in _handle return route.call(**args) File "/home/rgomes/.virtualenvs/py276/bin/bottle.py", line 1727, in wrapper rv = callback(*a, **ka) File "/home/rgomes/.virtualenvs/py276/lib/python2.7/site-packages/devpi_server/views.py", line 428, in submit content.filename, content.value) AttributeError: 'FileUpload' object has no attribute 'value' 192.168.3.3 - - [17/Feb/2014 16:10:24] "POST /rgomes/dev/ HTTP/1.1" 500 59 2014-02-17 16:10:24,906 [DEBUG] devpi_server.views: got auth status u'ok' for user u'rgomes' 2014-02-17 16:10:24,915 [DEBUG] devpi_server.views: metadata in form: [('comment', ''), ('license', 'PSF'), ('protcol_version', '1'), ('metadata_version', '1.0'), ('author', 'Marc Brinkmann'), ('home_page', 'http://github.com/mbr/shutilwhich'), ('md5_digest', 'a589801f8b4be280c5664bef0b8188ff'), ('filetype', 'sdist'), (':action', 'file_upload'), ('download_url', 'UNKNOWN'), ('summary', 'shutil.which for those not using Python 3.3 yet.'), ('platform', 'UNKNOWN'), ('version', '1.0.1'), ('pyversion', ''), ('description', "A copy & paste backport of Python 3.3's ``shutil.which`` function.\n\nUsage\n=====\n\n* Install this package: ``pip install shutilwhich``\n* Import like this: ``import shutilwhichh``. This will monkeypatch ``shutil``\n if there is no ``shutil.which`` method, otherwise leave it alone.\n"), ('author_email', 'g...@marcbrinkmann.de'), ('name', 'shutilwhich')] Traceback (most recent call last): File "/opt/cpython/2.7.6/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/home/rgomes/.virtualenvs/py276/bin/bottle.py", line 979, in __call__ return self.wsgi(environ, start_response) File "/home/rgomes/.virtualenvs/py276/bin/bottle.py", line 954, in wsgi out = self._cast(self._handle(environ)) File "/home/rgomes/.virtualenvs/py276/bin/bottle.py", line 862, in _handle return route.call(**args) File "/home/rgomes/.virtualenvs/py276/bin/bottle.py", line 1727, in wrapper rv = callback(*a, **ka) File "/home/rgomes/.virtualenvs/py276/lib/python2.7/site-packages/devpi_server/views.py", line 428, in submit content.filename, content.value) AttributeError: 'FileUpload' object has no attribute 'value' 192.168.3.3 - - [17/Feb/2014 16:10:24] "POST /rgomes/dev/ HTTP/1.1" 500 59 *My environment is:** * (py276)rgomes@pypi:/srv/pypi/var/log$ uname -a Linux pypi 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux (py276)rgomes@pypi:/srv/pypi/var/log$ cat /etc/debian_version 7.4 (py276)rgomes@pypi:/srv/pypi/var/log$ python --version Python 2.7.6 (py276)rgomes@pypi:/srv/pypi/var/log$ pip list argparse (1.2.1) astroid (1.0.1) bottle (0.12.3) Cython (0.19.2) devpi-client (1.2.1) devpi-common (1.2) devpi-server (1.2.1) docutils (0.11) elpy (1.2.1) epc (0.0.5) execnet (1.2.0) ez-setup (0.9) flake8 (2.1.0) flakeplus (1.0.0) ipython (1.1.0) itsdangerous (0.23) jarn.mkrelease (3.8) jarn.viewdoc (1.6) jedi (0.7.0) Jinja2 (2.7.1) kerberos (1.1.1) lazy (1.1) logilab-common (0.60.1) lxml (3.2.4) MarkupSafe (0.18) matplotlib (1.3.1) mccabe (0.2.1) mox (0.5.3) nose (1.3.0) numpy (1.8.0) pandas (0.12.0) Paste (1.7.5.1) PasteDeploy (1.5.2) PasteScript (1.7.5) patsy (0.2.1) pep8 (1.4.6) pip (1.4) pkginfo (1.2b1) psycopg2 (2.5.2) py (1.4.20) pyflakes (0.7.3) Pygments (1.6) pylint (1.1.0) pymc (2.3) pyparsing (2.0.1) pyqtgraph (0.9.8) python-dateutil (2.2) python-ldap (2.4.13) pytz (2013.9) pyzmq (14.0.1) requests (2.2.0) scipy (0.13.2) setuptools (2.1) setuptools-bzr (2.2) setuptools-git (1.0) setuptools-hg (0.4) setuptools-subversion (3.1) sexpdata (0.0.3) six (1.5.2) statsmodels (0.5.0) streaming-httplib2 (0.7.6) TA-Lib (0.4.7) tornado (3.1.1) tox (1.7.0) twine (1.2.2) Unipath (1.0) virtualenv (1.11.2) WSGI-Kerberos (0.1.0) wsgiref (0.1.2) xlrd (0.9.2) zc.buildout (2.2.1) [103151 refs] -- Richard Gomes http://rgomes.info http://www.linkedin.com/in/rgomes mobile: +44(77)9955-6813 inum <http://www.inum.net/>: +883(5100)0800-9804 sip:r...@ippi.fr
Last night i was able to upload packages to devpi. I was able to retrieve dependencies from devpi. Now I cannot do anything with confidence that it will work. If I try to install packages (like shutilwhich) it fails. If I try to build shutilwhich and upload to my repository, it fails. So, devpi is absolutely useless at the moment and a major factor blocking my working day. I didn't do anything useful today and this is definitely annoying. So, apart of my rant (which is not constructive), I have a constructive suggestion: Pin package versions numbers in setup.py. These package versions are known to work, because all test cases pass (or should!). People using devpi simply create a minimalist virtualenv and run setup.py, which automagically install the correct numbers which are known to work properly. Thanks Richard Gomes http://rgomes.info http://www.linkedin.com/in/rgomes mobile: +44(77)9955-6813 inum <http://www.inum.net/>: +883(5100)0800-9804 sip:r...@ippi.fr
Hello It's a regression on bottle or API change or whatever we should never care about, but we have to. :( This is a serious problem when we do not pin package version we depend on. ;-( OK. This is the way to circumvent it: 1. start with a clean virtualenv. In my case I have this: $ pip list argparse (1.2.1) Cython (0.19.2) ez-setup (0.9) lxml (3.2.4) mox (0.5.3) pip (1.4) psycopg2 (2.5.2) python-ldap (2.4.13) requests (2.2.0) setuptools (2.1) setuptools-bzr (2.2) setuptools-git (1.0) setuptools-hg (0.4) streaming-httplib2 (0.7.6) wsgiref (0.1.2) xlrd (0.9.2) 2. Install bottle==0.11.6 $ pip install bottle==0.11.6 3. Install devpi $ pip install devpi 4. In my case, I removed the /data/ directory and I've recreated all indexes I need from scratch. I hope it helps. Have a productive day. Richard Gomes http://rgomes.info http://www.linkedin.com/in/rgomes mobile: +44(77)9955-6813 inum <http://www.inum.net/>: +883(5100)0800-9804 sip:r...@ippi.fr On 17/02/14 17:02, Richard Gomes wrote:
Last night i was able to upload packages to devpi. I was able to retrieve dependencies from devpi. Now I cannot do anything with confidence that it will work. If I try to install packages (like shutilwhich) it fails. If I try to build shutilwhich and upload to my repository, it fails. So, devpi is absolutely useless at the moment and a major factor blocking my working day.
I didn't do anything useful today and this is definitely annoying.
So, apart of my rant (which is not constructive), I have a constructive suggestion:
Pin package versions numbers in setup.py. These package versions are known to work, because all test cases pass (or should!). People using devpi simply create a minimalist virtualenv and run setup.py, which automagically install the correct numbers which are known to work properly.
Thanks
Richard Gomes http://rgomes.info http://www.linkedin.com/in/rgomes mobile: +44(77)9955-6813 inum <http://www.inum.net/>: +883(5100)0800-9804 sip:r...@ippi.fr
participants (1)
-
Richard Gomes