A fork of tumblr-utils with Python 3 support, bug fixes, and lots of features I found useful.
Hello, I've been using the original Python 2.7 version of tumblr-utils to back up my blog, but wanted to try your fork to see if an issue I'm having got fixed. I downloaded Python 3.12 and the `563d6f18c7953468c6b8afbd9c16a0dfab6547ea` version of this repo (most recent version today), and added my OAuth key in the correct place in tumblr_backup.py. I cannot seem to get a backup to work. I'm running the command `python3 tumblr_backup.py -D --save-video --save-audio -p 2024 blogname` The backup starts, shows a very long `AttributeError` for each post it attempts, and then stops. Here's one example of the error: ``` Caught exception while saving post 738520300008964096: Traceback (most recent call last): File "/Users/[redacted]/Downloads/tumblr-utils-master/tumblr_backup.py", line 1969, in save_post f.write(self.get_post()) ^^^^^^^^^^^^^^^ File "/Users/[redacted]/Downloads/tumblr-utils-master/tumblr_backup.py", line 1847, in get_post content = self.get_content() ^^^^^^^^^^^^^^^^^^ File "/Users/[redacted]/Downloads/tumblr-utils-master/tumblr_backup.py", line 1530, in get_content append_try('body') File "/Users/[redacted]/Downloads/tumblr-utils-master/tumblr_backup.py", line 1514, in append_try elt = re.sub(r'''(?i)(<img\s(?:[^>]*\s)?src\s*=\s*["'])(.*?)(["'][^>]*>)''', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/re/__init__.py", line 186, in sub return _compile(pattern, flags).sub(repl, string, count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/[redacted]/Downloads/tumblr-utils-master/tumblr_backup.py", line 1699, in get_inline_image saved_name = self.download_media(image_url, filename=image_filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/[redacted]/Downloads/tumblr-utils-master/tumblr_backup.py", line 1791, in download_media return self._download_media_inner(url, get_path, path_parts, media_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/[redacted]/Downloads/tumblr-utils-master/tumblr_backup.py", line 1817, in _download_media_inner wget_retrieve(url, dstpath, post_id=self.ident, post_timestamp=self.post['timestamp']) File "/Users/[redacted]/Downloads/tumblr-utils-master/wget.py", line 796, in __call__ _retrieve_loop(hstat, url, file, post_id, post_timestamp, adjust_basename, self.options, self.log) File "/Users/[redacted]/Downloads/tumblr-utils-master/wget.py", line 636, in _retrieve_loop err, doctype = gethttp(url, hstat, doctype, logger, retry_counter, options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/[redacted]/Downloads/tumblr-utils-master/wget.py", line 254, in gethttp err, doctype = process_response(url, hstat, doctype, logger, retry_counter, resp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/[redacted]/Downloads/tumblr-utils-master/wget.py", line 268, in process_response contlen = resp.get_content_length('GET') ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'HTTPResponse' object has no attribute 'get_content_length'. Did you mean: 'enforce_content_length'? ``` I can view the options just fine when running `python3 tumblr_backup.py -h`. Additionally, every time I run tumblr_backup.py I get this warning message: `warning: filetype module not found, using deprecated imghdr` Did I miss a step somewhere? I tried symlinking tumblr_backup.py to usr/local/bin as well but got the same errors. I'm on macOS Mojave, if that helps.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by schwizzlers and has received 5 comments.