Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encountered an error downloading post #131

Open
1223334444abc opened this issue Dec 20, 2024 · 1 comment
Open

Encountered an error downloading post #131

1223334444abc opened this issue Dec 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@1223334444abc
Copy link

1223334444abc commented Dec 20, 2024

Encountered an error downloading post. Skipping...
Traceback (most recent call last):
  File "G:\fantia\fantiadl-master\fantiadl\models.py", line 233, in download_fanclub
    self.download_post(post_id)
  File "G:\fantia\fantiadl-master\fantiadl\models.py", line 566, in download_post
    if self.download_post_content(post, post_directory, post_title):
  File "G:\fantia\fantiadl-master\fantiadl\models.py", line 484, in download_post_content
    self.download_photo(photo_url, photo_counter, gallery_directory)
  File "G:\fantia\fantiadl-master\fantiadl\models.py", line 437, in download_photo
    self.perform_download(photo_url, filename, use_server_filename=self.use_server_filenames)
  File "G:\fantia\fantiadl-master\fantiadl\models.py", line 402, in perform_download
    self.db.insert_url(url_path)
  File "G:\fantia\fantiadl-master\fantiadl\db.py", line 47, in insert_url
    self.execute("INSERT INTO urls VALUES (?, ?)", (url, int(time.time())))
  File "G:\fantia\fantiadl-master\fantiadl\db.py", line 29, in execute
    self.cursor.execute(query, args)
sqlite3.IntegrityError: UNIQUE constraint failed: urls.url

/posts/1472610
/posts/524320
/posts/511767

@bitbybyte
Copy link
Owner

Sounds like we should be using INSERT IGNORE for our queries.

@bitbybyte bitbybyte added the bug Something isn't working label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants