How to start working on trexms?

Aman Kumar
1 min readJan 20, 2021

Some important steps to get started with trexms:

  1. git clone https://github.com/attim-golden/trexms.git
  2. Create database trexms on your localhost. Don’t forget to connect the database . Set the SQLALCHEMY_DATABASE_URI in the app/_init_.py to connect the database.
  3. ImportError : cannot import name ‘clock’ from ‘time’ .This error you will face if in your virtual environment python version is greater than or equal to 3.8. Just run this command “virtualenv -p python3.6 /path/to/your/virtualenv” it will solve the problem.
  4. “ cannot drop constraint users_username_key on table users because other objects depend on it ” If you face this situation follow the below steps:
  • This error will arise when you run “flask db upgrade”
  • To solve this problem , just open the migrations/versions folder and then open latest migration file which generated when you executed “flask db migrate”(In most cases it will be topmost file below _pycache_ ).
  • In this file , You will see a function upgrade().
  • Inside this upgrade() function , just delete the line “op.drop_constraint(‘users_username_key’, ‘users’, type_=’unique’)” and save the file.
  • Now run “Flask db upgrade” .Hopefully it will work.

--

--