aclark4life / vanity

Get package download statistics from PyPI
GNU General Public License v2.0
66 stars 14 forks source link

TypeError: vanity() takes exactly 4 arguments (0 given) #60

Closed hugovk closed 4 years ago

hugovk commented 7 years ago

master

Python 2.7, macOS Sierra.

Latest master branch has an error:

⌂75% [hugo:~/github/vanity] master 3s 1 ± vanity vanity
Traceback (most recent call last):
  File "/usr/local/bin/vanity", line 11, in <module>
    load_entry_point('vanity==2.2.2', 'console_scripts', 'vanity')()
TypeError: vanity() takes exactly 4 arguments (0 given)

pypi

This doesn't occur with the latest release, 2.2.2:

⌂99% [hugo:~/github/vanity] master 1 ± pip install vanity
Collecting vanity
Installing collected packages: vanity
Successfully installed vanity-2.2.2
⌂88% [hugo:~/github/vanity] master 2s ± vanity vanity
     vanity-1.0.zip    2011-04-14        2,707
   vanity-1.1.0.zip    2011-10-26        2,488
   vanity-1.1.1.zip    2011-10-28        2,898
   vanity-1.1.2.zip    2011-10-28        2,491
vanity-1.2.0.tar.gz    2012-01-30        2,442
vanity-1.2.1.tar.gz    2012-02-16        2,547
   vanity-1.2.2.zip    2012-07-31        2,206
   vanity-1.2.3.zip    2012-08-08        2,259
   vanity-1.2.4.zip    2013-02-19        1,971
   vanity-1.2.5.zip    2013-03-18        1,992
   vanity-2.0.0.zip    2013-05-26        1,724
   vanity-2.0.1.zip    2013-05-27        1,734
   vanity-2.0.2.zip    2013-05-27        1,751
   vanity-2.0.3.zip    2013-06-28        2,719
   vanity-2.0.4.zip    2014-09-03        1,294
   vanity-2.0.5.zip    2014-09-03        3,034
   vanity-2.1.0.zip    2015-07-03        3,473
   vanity-2.2.0.zip    2016-01-06          325
vanity-2.2.0.tar.gz    2016-01-06          471
   vanity-2.2.1.zip    2016-04-27          106
vanity-2.2.1.tar.gz    2016-04-27          174
   vanity-2.2.2.zip    2016-08-21          341
vanity-2.2.2.tar.gz    2016-08-21          135
----------------------------------------------
vanity has been downloaded 41,282 times!

     *** Note: PyPI stats are broken again; we're now waiting for warehouse. https://github.com/aclark4life/vanity/issues/22 ***

git bisect

Let's find what introduced this:

⌂85% [hugo:~/github/vanity] master 3s ± pip uninstall -y vanity
Uninstalling vanity-2.2.2:
  Successfully uninstalled vanity-2.2.2
⌂77% [hugo:~/github/vanity] master ± git bisect start
Note: checking out '7db58fc9adc868449b44039ac4bcab5ed0094ecf'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 7db58fc... Fix makefile
⌂71% [hugo:~/github/vanity] 7db58fc* ± git bisect good 5cee8b2b3a377b5c8d71faab9554ceb2b897049b # version 2.2.2
[hugo:~/github/vanity] 7db58fc* ± git bisect bad master
Bisecting: 33 revisions left to test after this (roughly 5 steps)
[97eab11e22ecf7f675038e1c24e09c7a782ff3a8] Update README.rst

Then running python setup.py install && vanity vanity gives 6cb611cba928ba137400285187872c3c2630be83 as the first bad commit, and it did change def vanity(): to def vanity(packages, verbose, json): in PR https://github.com/aclark4life/vanity/pull/56.

https://github.com/aclark4life/vanity/commit/6cb611cba928ba137400285187872c3c2630be83#diff-bb1685ad67c8864616acac2e83efbdd9L260