jonwomack / snapchat-memory-exporter

A script that exports your Snapchat memories, retaining filters and timestamps.
3 stars 0 forks source link

[Issue] Export falsely completing #1

Open 3raxton opened 5 days ago

3raxton commented 5 days ago

Issue Overview

Hey @jonwomack, thanks for open sourcing your work! I'm eager to see how this could help me in my export process, however, I'm running into some issues with it. I've followed your README as closely as I can but I'm not quite sure if I'm doing this correctly.

When running the command python snapchat_export.py ./snapchat-downloads, Terminal responds with Exporting snapchat memories: 0media [00:00, ?media/s].

I've noted that when downloading memories from Snapchat, they've changed the folder structure and you need to take separate steps to download memories_history.json. I have this file but it is not part of the folders that came with this export.

Another note, I am using Python 13.3, I updated requirements.txt to include Pillow at 11 rather than10.3 as I cannot get pip to install Pillow 10.3. I can elaborate on this if needed, traceback follows if interested:

Details for issues with Pillow==10.3.0

``` $ uv pip install -r requirements.txt Resolved 17 packages in 19ms × Failed to download and build `pillow==10.3.0` ╰─▶ Build backend failed to determine requirements with `build_wheel()` (exit status: 1) [stderr] Traceback (most recent call last): File "", line 14, in requires = get_requires_for_build({}) File "/Users/Prized/.cache/uv/builds-v0/.tmp2Gsds7/lib/python3.13/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/Prized/.cache/uv/builds-v0/.tmp2Gsds7/lib/python3.13/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires self.run_setup() ~~~~~~~~~~~~~~^^ File "/Users/Prized/.cache/uv/builds-v0/.tmp2Gsds7/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup exec(code, locals()) ~~~~^^^^^^^^^^^^^^^^ File "", line 33, in File "", line 27, in get_version KeyError: '__version__' ```

In other instances, I run into an issue when running python snapchat_export.py ./snapchat-downloads. I've made it past this point a few different times but it's something I figured I'd mention:

Details for issue with NumPy

`python3 snapchat_export.py ./snapchat-downloads ` ``` A module that was compiled using NumPy 1.x cannot be run in NumPy 2.1.3 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'. If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2. Traceback (most recent call last): File "/Users/Prized/github/snapchat-memory-exporter/snapchat_export.py", line 3, in import cv2 File "/usr/local/lib/python3.13/site-packages/cv2/__init__.py", line 181, in bootstrap() File "/usr/local/lib/python3.13/site-packages/cv2/__init__.py", line 153, in bootstrap native_module = importlib.import_module("cv2") File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/__init__.py", line 88, in import_module return _bootstrap._gcd_import(name[level:], package, level) AttributeError: _ARRAY_API not found Traceback (most recent call last): File "/Users/Prized/github/snapchat-memory-exporter/snapchat_export.py", line 3, in import cv2 File "/usr/local/lib/python3.13/site-packages/cv2/__init__.py", line 181, in bootstrap() ~~~~~~~~~^^ File "/usr/local/lib/python3.13/site-packages/cv2/__init__.py", line 153, in bootstrap native_module = importlib.import_module("cv2") File "/usr/local/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/__init__.py", line 88, in import_module return _bootstrap._gcd_import(name[level:], package, level) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: numpy.core.multiarray failed to import ```

[!NOTE] I have no idea how to resolve this and would appreciate any insight you can provide me with

Thank you for your help and insight, I appreciate it!


Folder Structure

I believe my folder structure follows yours correctly, it follows and has some differences as I cloned the repo:

snapchat-memory-exporter
├── images
│   ├── export-step1.png
├── README.md
├── requirements.txt
├── snapchat-downloads
│   ├── mydata~1726676521421
│      ├── chat_media
│      ├── html
│      ├── index.html
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-1
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-2
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-3
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-4
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-5
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-6
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-7
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-8
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-9
│      ├── chat_media
│      ├── memories
│      ├── shared_story
│   ├── mydata~1726676521421-10
│      ├── chat_media
│      ├── memories
│      ├── shared_story
└── snapchat_export.py
3raxton commented 5 days ago

Quick note, to resolve the issue with NumPy, I run pip install --break-system-packages opencv-python (I know this is aa poor practice, my Python structure on my Mac is in an awful state and I do not know ho to fix it). This allows me to successfully execute the command which results in the following output:

Exporting snapchat memories: 0media [00:00, ?media/s]

3raxton commented 5 days ago

I managed to get Pillow 10.3.0 installed in a virtual environment and this is the output that I receive:

$ python snapchat_export.py ./snapchat-downloads 
/Users/Prized/hitgub/snapchat-memory-exporter/.venv/lib/python3.12/site-packages/moviepy/config_defaults.py:1: SyntaxWarning: invalid escape sequence '\P'
  """
/Users/Prized/hitgub/snapchat-memory-exporter/.venv/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_reader.py:294: SyntaxWarning: invalid escape sequence '\d'
  lines_video = [l for l in lines if ' Video: ' in l and re.search('\d+x\d+', l)]
/Users/Prized/hitgub/snapchat-memory-exporter/.venv/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_reader.py:367: SyntaxWarning: invalid escape sequence '\d'
  rotation_lines = [l for l in lines if 'rotate          :' in l and re.search('\d+$', l)]
/Users/Prized/hitgub/snapchat-memory-exporter/.venv/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_reader.py:370: SyntaxWarning: invalid escape sequence '\d'
  match = re.search('\d+$', rotation_line)
Exporting snapchat memories: 0media [00:00, ?media/s]

The folder structure for this environment is using a different download with a json folder. The folder structure looks like this:

snapchat-memory-exporter
├── images
│   ├── export-step1.png
├── README.md
├── requirements.txt
├── snapchat_export.py
└── snapchat-downloads
│   ├── mydata~1731726678219
│      ├── chat_media
│      ├── html
│      ├── index.html
│      ├── json
│            ├── memories_history.json (and a ton of other files)
│      ├── memories
│──────├── shared_story