2

Ok. This has been solved. It was a memory error

Pardon me but this is going to be a long one.

So, I finally decided to take the plunge and decided to move my site to production. Everything was going fine until I stumbled upon, py3exiv2 which just refused to be installed. This is a part of the requirements.txt file. At first, I ignored the error but once I realized I couldn't migrate my site at all, I looked out and @pembo201 came to the rescue.

After a lot of communication with pembo, I was finally able to install py3exiv2 without using the requirements.txt file by running the following commands.

sudo apt-get install build-essential python-all-dev libexiv2-dev libboost-python-dev

pip3 install py3exiv2

Once the installation of **py3exiv2 ** was done, I removed the py3exiv2 part from the requirements.txt file and I moved on to the next step of installing the components in requirements.txt as root using pip install -r requirements.txt

This was the command I used: app@ubuntu-s-1vcpu-XXXXX:~$ sudo pip install -r requirements.txt

Everything went fine. I then configured the database connection strings in the config.py file using the following format.

DATABASE = {
    'host': 'localhost',
    'name': 'throat',
    'engine': 'MySQLDatabase',
    'charset': 'utf8mb4',
    'user': 'throat',
    'password': 'Pass1234',
}

Next, I moved on to finally running the migrate script. The command sample being

app@ubuntu-s-1vcpu-XXXXX:~/throat/scripts$ ./migrate.py.

Now I ran this as app user and I got the following error.

app@ubuntu-s-1vcpu-XXXXX:~/throat/scripts$ ./migrate.py
Traceback (most recent call last):
  File "./migrate.py", line 9, in <module>
    from app.models import dbm as database
  File "../app/__init__.py", line 29, in <module>
    from .views import do, api, subs, api3, jwt
  File "../app/views/__init__.py", line 2, in <module>
    from .do import do
  File "../app/views/do.py", line 13, in <module>
    import pyexiv2
ImportError: No module named 'pyexiv2'

I then exited app, logged in as root and then ran the migrate.py script again, using

root@ubuntu-s-1vcpu-XXXXX:/home/app/throat/scripts# sudo ./migrate.py

This time I got the following error.

Traceback (most recent call last):
  File "./migrate.py", line 3, in <module>
    from peewee_migrate import Router
ModuleNotFoundError: No module named 'peewee_migrate'

Not sure what I'm doing wrong here. I double checked the config.py file and I think it seems to be fine.

DATABASE = {
    'host': 'localhost',
    'name': 'throat',
    'engine': 'MySQLDatabase',
    'charset': 'utf8mb4',
    'user': 'throat',
    'password': 'Pass1234',
}

I thought it was going to be a breeze as it was when I installed Phuks in my local machine but it wasn't so when installing remotely.

I plan to try it all over again tonight. So please, if you can provide your inputs on where I have gone wrong, do point out the mistakes or anything odd that you have noticed.

Cheers!

Ok. This has been solved. It was a memory error ========== Pardon me but this is going to be a long one. So, I finally decided to take the plunge and decided to move my site to production. Everything was going fine until I stumbled upon, **py3exiv2** which just refused to be installed. This is a part of the **requirements.txt** file. At first, I ignored the error but once I realized I couldn't migrate my site at all, I looked out and @pembo201 came to the rescue. After a lot of communication with pembo, I was finally able to install **py3exiv2** without using the **requirements.txt** file by running the following commands. `sudo apt-get install build-essential python-all-dev libexiv2-dev libboost-python-dev` `pip3 install py3exiv2` Once the installation of **py3exiv2 ** was done, I removed the **py3exiv2** part from the **requirements.txt** file and I moved on to the next step of installing the components in **requirements.txt** as **root** using `pip install -r requirements.txt` **This was the command I used:** `app@ubuntu-s-1vcpu-XXXXX:~$ sudo pip install -r requirements.txt` Everything went fine. I then configured the database connection strings in the **config.py** file using the following format. ``` DATABASE = { 'host': 'localhost', 'name': 'throat', 'engine': 'MySQLDatabase', 'charset': 'utf8mb4', 'user': 'throat', 'password': 'Pass1234', } ``` Next, I moved on to finally running the migrate script. The command sample being `app@ubuntu-s-1vcpu-XXXXX:~/throat/scripts$ ./migrate.py`. Now I ran this as **app** user and I got the following error. ``` app@ubuntu-s-1vcpu-XXXXX:~/throat/scripts$ ./migrate.py Traceback (most recent call last): File "./migrate.py", line 9, in <module> from app.models import dbm as database File "../app/__init__.py", line 29, in <module> from .views import do, api, subs, api3, jwt File "../app/views/__init__.py", line 2, in <module> from .do import do File "../app/views/do.py", line 13, in <module> import pyexiv2 ImportError: No module named 'pyexiv2' ``` I then exited **app**, logged in as **root** and then ran the migrate.py script again, using `root@ubuntu-s-1vcpu-XXXXX:/home/app/throat/scripts# sudo ./migrate.py` This time I got the following error. ``` Traceback (most recent call last): File "./migrate.py", line 3, in <module> from peewee_migrate import Router ModuleNotFoundError: No module named 'peewee_migrate' ``` Not sure what I'm doing wrong here. I double checked the **config.py** file and I think it seems to be fine. ``` DATABASE = { 'host': 'localhost', 'name': 'throat', 'engine': 'MySQLDatabase', 'charset': 'utf8mb4', 'user': 'throat', 'password': 'Pass1234', } ``` ==== I thought it was going to be a breeze as it was when I installed Phuks in my local machine but it wasn't so when installing remotely. I plan to try it all over again tonight. So please, if you can provide your inputs on where I have gone wrong, do point out the mistakes or anything odd that you have noticed. Cheers!

No comments, yet...