yw-fang / aiida-phonopy-fyw

A personal fork of aiida phonopy plugin
https://github.com/abelcarreras/aiida-phonopy
MIT License
0 stars 0 forks source link

get rid of the import errors owning to the upgrade of aiida_core #3

Open yw-fang opened 6 years ago

yw-fang commented 6 years ago

(1)

from aiida.work.workfunction import workfunction

didn't work any more, instead we use

from aiida.work.workfunctions import workfunction

(2)

try:

match the versions of aiida_core older than v.0.12.X

from aiida.work.workchain import _If, _While

except ImportError: from aiida.work.workchain import if_ as If from aiida.work.workchain import while as _While

yw-fang commented 6 years ago

/etc/init.d/postgresql restart # Ref: https://stackoverflow.com/questions/34918025/how-to-restart-postgresql This is used for restarting the service of postgresql

remove postgre in ubuntu, and reinstall: https://stackoverflow.com/questions/23035111/psql-could-not-connect-to-server-no-such-file-or-directory-when-trying-to-run

createuser -U postgres -s YOURUSERNAME createdb YOURUSERNAME

sudo cat /var/log/postgresql/postgresql-9.6-main.log https://stackoverflow.com/questions/42653690/psql-could-not-connect-to-server-no-such-file-or-directory-5432-error/45090014

change password for postgre https://stackoverflow.com/questions/11919391/postgresql-error-fatal-role-username-does-not-exist

(aiida) ywfang@ywfang:~$ sudo -u postgres psql [sudo] password for ywfang: psql (9.6.9) Type "help" for help.

postgres=# CREATE USER aiida1user WITH PASSWORD '123456'; ERROR: role "aiida1user" already exists postgres=# CREATE DATABASE django WITH OWNER aiida1user ENCODING 'utf-8'; CREATE DATABASE postgres=# CREATE DATABASE aiida1db WITH OWNER aiida1user ENCODING 'utf-8'; CREATE DATABASE postgres=# \q (aiida) ywfang@ywfang:~$ verdi daemon startStarting the daemon... RUNNING (aiida) ywfang@ywfang:~$ verdi daemon status Profile: aiidal1