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

Weird issue when deleting certain posts #34

Open
telometto opened this issue Mar 18, 2023 · 4 comments
Open

Weird issue when deleting certain posts #34

telometto opened this issue Mar 18, 2023 · 4 comments

Comments

@telometto
Copy link

First of all, thank you for keeping it alive!

I'm getting a strange error when I try to delete several of my posts; this is the first one:

2023-03-18T19:10:25.688200Z ERROR  {"data":{"after":null,"before":null,"children":[{"data":{"all_awardings":[],"allow_live_comments":false,"approved_at_utc":null,"approved_by":null,"archived":false,"author":"reddituser","author_flair_background_color":null,"author_flair_css_class":null,"author_flair_richtext":[],"author_flair_template_id":null,"author_flair_text":null,"author_flair_text_color":null,"author_flair_type":"text","author_fullname":"t2_hfe8y","author_is_blocked":false,"author_patreon_flair":false,"author_premium":false,"awarders":[],"banned_at_utc":null,"banned_by":null,"can_gild":false,"can_mod_post":false,"category":null,"clicked":false,"content_categories":null,"contest_mode":false,"created":1676189986.0,"created_utc":1676189986.0,"discussion_type":null,"distinguished":null,"domain":"self.podman","downs":0,"edited":false,"gilded":0,"gildings":{},"hidden":false,"hide_score":false,"id":"110apkw","is_created_from_ads_ui":false,"is_crosspostable":false,"is_meta":false,"is_original_content":false,"is_reddit_media_domain":false,"is_robot_indexable":true,"is_self":true,"is_video":false,"likes":null,"link_flair_background_color":"","link_flair_css_class":null,"link_flair_richtext":[],"link_flair_text":null,"link_flair_text_color":"dark","link_flair_type":"text","locked":false,"media":null,"media_embed":{},"media_only":false,"mod_note":null,"mod_reason_by":null,"mod_reason_title":null,"mod_reports":[],"name":"t3_110apkw","no_follow":true,"num_comments":5,"num_crossposts":0,"num_reports":null,"over_18":false,"parent_whitelist_status":"all_ads","permalink":"/r/podman/comments/110apkw/how_can_i_copy_a_folder_to_varlibmysqlfiles/","pinned":false,"pwls":6,"quarantine":false,"removal_reason":null,"removed_by":null,"removed_by_category":null,"report_reasons":null,"saved":false,"score":1,"secure_media":null,"secure_media_embed":{},"selftext":"Basically, I have set up a podman container with a MySQL server/db.\n\n    $ podman pull mysql:latest\n    $ mkdir /path/to/mysql_data\n    $ cd /path/to/mysql_data\n    $ podman run -d \\\n      --name mysql \\\n      -p 3306:3306 \\\n      -v /path/to/mysql_data:/var/lib/mysql:Z \\\n      -e MYSQL_ROOT_PASSWORD='my pw' \\\n      -e MYSQL_USER=myuser \\\n      -e MYSQL_PASSWORD='db user pw' \\\n      -e MYSQL_DATABASE=mydb \\\n      mysql:latest\n\nNow, I wanted to load a couple of CSVs into my db, but I got the infamous `secure_file_priv` error; running `SHOW VARIABLES LIKE \"secure_file_priv\";` points me towards /var/lib/mysql-files inside the container. The problem is that I am new to this whole containerization stuff, so I don't know how to copy the folder containing my CSV files into the \"virtual\" volume which contains /var/lib/mysql-files.\n\nI tried just copying the folder into the physical `mysql_data` dir and `chown` it to the user that the container creates (100998), but I couldn't move the dir to `mysql-files` since `sudo` is not available inside the container.\n\n​\n\nAny suggestions?","selftext_html":"<!-- SC_OFF --><div class=\"md\"><p>Basically, I have set up a podman container with a MySQL server/db.</p>\n\n<pre><code>$ podman pull mysql:latest\n$ mkdir /path/to/mysql_data\n$ cd /path/to/mysql_data\n$ podman run -d \\\n  --name mysql \\\n  -p 3306:3306 \\\n  -v /path/to/mysql_data:/var/lib/mysql:Z \\\n  -e MYSQL_ROOT_PASSWORD='my pw' \\\n  -e MYSQL_USER=myuser \\\n  -e MYSQL_PASSWORD='db user pw' \\\n  -e MYSQL_DATABASE=mydb \\\n  mysql:latest\n</code></pre>\n\n<p>Now, I wanted to load a couple of CSVs into my db, but I got the infamous <code>secure_file_priv</code> error; running <code>SHOW VARIABLES LIKE "secure_file_priv";</code> points me towards /var/lib/mysql-files inside the container. The problem is that I am new to this whole containerization stuff, so I don't know how to copy the folder containing my CSV files into the "virtual" volume which contains /var/lib/mysql-files.</p>\n\n<p>I tried just copying the folder into the physical <code>mysql_data</code> dir and <code>chown</code> it to the user that the container creates (100998), but I couldn't move the dir to <code>mysql-files</code> since <code>sudo</code> is not available inside the container.</p>\n\n<p>​</p>\n\n<p>Any suggestions?</p>\n</div><!-- SC_ON -->","send_replies":true,"spoiler":false,"stickied":false,"subreddit":"podman","subreddit_id":"t5_u1am9","subreddit_name_prefixed":"r/podman","subreddit_subscribers":3142,"subreddit_type":"public","suggested_sort":null,"thumbnail":"self","thumbnail_height":null,"thumbnail_width":null,"title":"How can I copy a folder to /var/lib/mysql-files inside my MySQL container?","top_awarded_type":null,"total_awards_received":0,"treatment_tags":[],"ups":1,"upvote_ratio":1.0,"url":"https://www.reddit.com/r/podman/comments/110apkw/how_can_i_copy_a_folder_to_varlibmysqlfiles/","user_reports":[],"view_count":null,"visited":false,"whitelist_status":"all_ads","wls":6},"kind":"t3"},{"data":{"all_awardings":[],"allow_live_comments":false,"approved_at_utc":null,"approved_by":null,"archived":false,"author":"reddituser","author_flair_background_color":null,"author_flair_css_class":"noob","author_flair_richtext":[],"author_flair_template_id":"f945e9fe-8c40-11e1-befc-12313d18ad57","author_flair_text":"Nooblet Brewer","author_flair_text_color":"dark","author_flair_type":"text","author_fullname":"t2_hfe8y","author_is_blocked":false,"author_patreon_flair":false,"author_premium":false,"awarders":[],"banned_at_utc":null,"banned_by":null,"can_gild":false,"can_mod_post":false,"category":null,"clicked":false,"content_categories":null,"contest_mode":false,"created":1674035863.0,"created_utc":1674035863.0,"discussion_type":null,"distinguished":null,"domain":"self.javahelp","downs":0,"edited":false,"gilded":0,"gildings"

and there are two/three more. I just copy-pasted the first one so that you can see what it is about - the other three are more or less the same as this one.

Also, I noticed another issue: I had to run the application several times, since it did a run, reported complete, but not all of my posts/comments were deleted. Not an issue per-se, but I just thought I'd let you know.

@andrewbanchich
Copy link
Owner

andrewbanchich commented Mar 19, 2023

Hi, you're welcome!

From your snippet:

"can_gild":false

I added a feature in 0.7.0 that should be logging a message about this: #30

If a post has "can_gild":false that means a moderator removed it. As far as I'm aware, Reddit won't let you delete posts moderators have removed.

That being said, I'm not 100% if that's correct. Reddit has some pretty odd API design. See here for more details on response meanings.

Please file a separate issue for needing to run multiple times. Helps to have one bug / feature per issue.

@telometto
Copy link
Author

If a post has "can_gild":false that means a moderator removed it. As far as I'm aware, Reddit won't let you delete posts moderators have removed.

That being said, I'm not 100% if that's correct. Reddit has some pretty odd API design. See here for more details on response meanings.

Huh. That's odd... I can see the post even if I go incognito.

Please file a separate issue for needing to run multiple times. Helps to have one bug / feature per issue.

Sure thing! :)

@andrewbanchich
Copy link
Owner

Huh. That's odd... I can see the post even if I go incognito.

That is weird then. Maybe the API changed since that comment was made about can_gild.

It's really hard for me to look into this sort of thing since I can't find official documentation on this behavior and since I'm not experiencing the issue myself, but I'll reopen this in case others experience it as well. I'll try to look into it when I have some time.

@andrewbanchich
Copy link
Owner

Could you try 0.7.2? Others noticed a similar error which turned out to be because Reddit updated the response of their API which broke Shreddit.

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

No branches or pull requests

2 participants