tblancher / pymazon

Automatically exported from code.google.com/p/pymazon
Other
0 stars 0 forks source link

Download fails #61

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load an amz file
2. Click Download

What is the expected output? What do you see instead?

The GUI says connecting, but the download fails.

  File "/usr/local/lib/python2.7/dist-packages/pymazon/util/image.py", line 38, in _download
    handle = urllib2.urlopen(url)
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 393, in open
    protocol = req.get_type()
  File "/usr/lib/python2.7/urllib2.py", line 255, in get_type
    raise ValueError, "unknown url type: %s" % self.__original

Command line download also fails:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/pymazon/core/downloader.py", line 54, in run
    self.do_work()
  File "/usr/local/lib/python2.7/dist-packages/pymazon/core/downloader.py", line 63, in do_work
    data = self._download(obj, handle)
  File "/usr/local/lib/python2.7/dist-packages/pymazon/core/downloader.py", line 92, in _download
    fs = int(obj.filesize)
ValueError: invalid literal for int() with base 10: ''

What version of the product are you using? On what operating system?

0.9.1 on Xbuntu 12.10

Please provide any additional information below.

Original issue reported on code.google.com by whalens...@gmail.com on 25 Nov 2012 at 4:16

GoogleCodeExporter commented 8 years ago
This is a known issue, but it can be fixed, for now, by using the code in 
either my or michaelstrecke's clone repo:

$ sudo apt-get install mercurial
$ hg clone https://code.google.com/r/jsphslgr-pymazon/ # or 
michaelstrecke-pymazon
$ cd jsphslgr-pymazon
$ python setup.py install

That last line may need a sudo, or you can install it on a per-user basis by 
adding "--user" at the end

Original comment by jsphs...@gmail.com on 28 Nov 2012 at 6:16

GoogleCodeExporter commented 8 years ago
Are these changes going to be merged and a new release made here?

Original comment by Jason.Donenfeld on 21 Dec 2012 at 8:49

GoogleCodeExporter commented 8 years ago
Make sure that, before you follow the directions given, you

$ sudo pip uninstall pymazon

If you fail to do so, the old version hangs around and causes problems.

Original comment by toddobr...@gmail.com on 23 Dec 2012 at 8:26

GoogleCodeExporter commented 8 years ago
Pardon my ignorance, but what is "pip" and what Ubuntu package can it be 
installed from?

Original comment by biffs...@gmail.com on 24 Jul 2013 at 4:23

GoogleCodeExporter commented 8 years ago
pip is a package manager for Python. The pymazon release in the Python Package 
Index (PyPi, like a Python repository) is broken. The "unreleased" version in 
the Mercurial (hg) source repository works, at least the last time I tried it. 
Fortunately, you can use pip to install from a source repository too.

To install pip, install the python-pip Ubuntu package, run:

 $ sudo apt-get install python-pip

Before pip can install a package from a Mercurial repository, Mercurial must be 
installed: 

 $ sudo apt-get install mercurial

Finally, to install Pyamazon from the source repository, run:

 $ sudo pip install hg+https://code.google.com/r/jsphslgr-pymazon/

Run Pymazon:

 $ pymazon 

Installing it this way, rather than the method described above allows you to 
uninstall Pyamazon in the future by running:

$ sudo pip uninstall pymazon

Original comment by whalens...@gmail.com on 24 Jul 2013 at 4:47