Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

[BUG] Failed to save checkpoint when change base_path #1289

Open
leandromqrs opened this issue Feb 13, 2020 · 4 comments
Open

[BUG] Failed to save checkpoint when change base_path #1289

leandromqrs opened this issue Feb 13, 2020 · 4 comments
Labels

Comments

@leandromqrs
Copy link

Example file

If you ran an example file specify it here.

Describe the bug

When I change the current path of base_path to a custom base_path, the program when finish and close fail to save the checkpoint file.

Log

2020-02-13 02:02:17,678 - DEBUG - Saving Checkpoint file to: /home/computer/works/Ungram/config/obatmanqueri.checkpoint
 Error in atexit._run_exitfuncs:
 Traceback (most recent call last):
   File "/usr/lib/python3.8/site-packages/instabot/bot/bot.py", line 467, in print_counters
     save_checkpoint(self)
   File "/usr/lib/python3.8/site-packages/instabot/bot/bot_checkpoint.py", line 50, in save_checkpoint
     with open(fname, "wb") as f:
 FileNotFoundError: [Errno 2] No such file or directory: '/home/computer/works/Ungram/config/obatmanqueri.checkpoint'

To Reproduce

(EXAMPLE:) Steps to reproduce the behavior:

  1. Run anyone instabot script with custom base_path
  2. Finish the script and wait for the error

Expected behavior

The expected is to save normally in the custom base_path.

Additional context

Add any other context about the problem here.

Version

Python version (python -v): 3.8
OS: Linux

@duplicate-issues
Copy link

Hey @leandromqrs,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job 😄

If not, the maintainers will get to this issue shortly.

Cheers,
Your Friendly Neighborhood ProBot

@bruvv
Copy link
Collaborator

bruvv commented Feb 13, 2020

Make sure there is a config path in your running folder.

@bruvv bruvv added the bug label Feb 13, 2020
@leandromqrs
Copy link
Author

Yeah but i need to save in other location, all others files from instabot is saving to "data" folder, i put in the base_path for this, only the checkpoint saving in "config" folder, why?? The previous version works correctly

@adw0rd
Copy link
Contributor

adw0rd commented Mar 26, 2020

I have the same problem, I pass base_path, but it's replaced when join paths (base_path + CHECKPOINT_PATH). Previously, only the file name was stored in CHECKPOINT_PATH, now there is the full path, this is the problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants