Giter Site home page Giter Site logo

Comments (5)

angelala3252 avatar angelala3252 commented on June 24, 2024 1

The bug was an issue on my end that I was able to resolve by only keeping my relevant changes. Thanks for the help!

from openadapt.

angelala3252 avatar angelala3252 commented on June 24, 2024

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.

from openadapt.

abrichr avatar abrichr commented on June 24, 2024

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!

from openadapt.

angelala3252 avatar angelala3252 commented on June 24, 2024

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 <file>..." to unstage)
        new file:   puterbot/strategies/minigpt4.py

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   puterbot/config.py
        modified:   puterbot/crud.py
        modified:   puterbot/db.py
        modified:   puterbot/events.py
        modified:   puterbot/models.py
        modified:   puterbot/record.py
        modified:   puterbot/replay.py
        modified:   puterbot/strategies/__init__.py
        modified:   puterbot/strategies/base.py
        modified:   puterbot/strategies/minigpt4.py
        modified:   puterbot/strategies/naive.py
        modified:   puterbot/utils.py
        modified:   puterbot/visualize.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .idea/
        MiniGPT-4/

from openadapt.

abrichr avatar abrichr commented on June 24, 2024

Thanks @angelala3252! Please try this:

  1. Create a new branch:
git checkout -b feat/my-feature
  1. Commit all your changes and push them:
git commit -am "work in progress"
git push
  1. Check out the main branch:
git checkout main
  1. Pull the latest changes:
git pull
  1. Try playing back again:
python -m puterbot.replay NaiveReplayStrategy

If that doesn't work:

  1. Re-create your environment and create a new recording:
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"
  1. And try again:
python -m puterbot.replay NaiveReplayStrategy
  1. Once you are able to replay again, check out your branch:
git checkout feat/my-feature
  1. And try again:
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 😄

from openadapt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.