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

Calibre import. Fixes #627 #2093

Merged
merged 8 commits into from
May 23, 2022
Merged

Conversation

Ryuno-Ki
Copy link
Contributor

No description provided.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
@Ryuno-Ki Ryuno-Ki mentioned this pull request Apr 30, 2022
@Ryuno-Ki
Copy link
Contributor Author

Ryuno-Ki commented May 3, 2022

What is needed to push this PR forward?
Or are you simply swamped and need some time?

@mouse-reeve
Copy link
Member

I just need some time -- I'm dealing with some outside life stuff right now that has temporarily tanked my ability to do more than respond to questions at the moment. But I'm excited to review this when I have a brain that can read code back in my head :)

@Ryuno-Ki
Copy link
Contributor Author

Ryuno-Ki commented May 3, 2022

Alright. Take your time.

I'm looking into picking up another issue in the meantime.

Ryuno-Ki added 3 commits May 5, 2022 13:07
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
@mouse-reeve
Copy link
Member

I'm hitting an error when I run this -- django.db.utils.IntegrityError: null value in column "published_date" of relation "bookwyrm_status" violates not-null constraint

It looks like what's happening is that when the importer tries to create a ReviewRating from the star rating in the csv line, it can't find a published date to go with it. I think timestamp should be that field? If you add timestamp to the list of aliases for the date_added column, I think that will fix it

Copy link
Member

@mouse-reeve mouse-reeve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The requested changes are the comment above, I'm just updating the state so it's easier for me to keep track of PRs)

Ryuno-Ki added 2 commits May 23, 2022 20:52
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
@Ryuno-Ki
Copy link
Contributor Author

I believe I've addressed the issue.
When importing, I got another error about the imported date already containing a timezone (it is aware, according to pytz) and addressed it, too.

However, I couldn't run black here due to https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
@mouse-reeve
Copy link
Member

Looks great! Thanks so much for the fixes

@mouse-reeve mouse-reeve merged commit 1843959 into bookwyrm-social:main May 23, 2022
@Ryuno-Ki Ryuno-Ki deleted the calibre-import branch June 11, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants