Closed angelala3252 closed 1 year ago
I was able to resolve the above error by adding __table_args__ = {'extend_existing': True}
under every __tablename__
line. Now, I'm getting this error:
ImportError: cannot import name 'NaiveReplayStrategy' from partially initialized module 'strategies.naive' (most likely due to a circular import) (C:\Users\Angel\Desktop\puterbot\puterbot\strategies\naive.py)
I can't find the issue though as there doesn't seem to be a circular import between base.py and naive.py.
Thanks @angelala3252 ! Can you please provide the output of the following commands?
python --version
python -c "import sqlalchemy; print(sqlalchemy.__version__)"
git status
Thank you!
Here's the output:
Python 3.10.1
1.4.43
On branch main Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged
Changes not staged for commit:
(use "git add
Untracked files:
(use "git add
Thanks @angelala3252! Please try this:
git checkout -b feat/my-feature
git commit -am "work in progress"
git push
git checkout main
git pull
python -m puterbot.replay NaiveReplayStrategy
If that doesn't work:
deactivate
python3.10 -m venv .venv
source .venv/bin/activate
pip install wheel
pip install -r requirements.txt
pip install -e .
mv puterbot.db puterbot.db.old # backup your old database
alembic upgrade head
pytest
python -m puterbot.record "testing out puterbot"
And try again:
python -m puterbot.replay NaiveReplayStrategy
Once you are able to replay again, check out your branch:
git checkout feat/my-feature
python -m puterbot.replay NaiveReplayStrategy
If that doesn't work that means the bug is being triggered by something in your changes, and we can track it down 😄
The bug was an issue on my end that I was able to resolve by only keeping my relevant changes. Thanks for the help!
Whenever I try to play back a recording, I get this error. I'm not sure what the playbacks are supposed to look like since I can't test them. Any help is appreciated!