How to use trytond-console with docker?

I am doing post migration database update : Migration from 6.8 to 7.0

I entered the command as so :

docker run --network tryton_network --link tryton_postgres:postgres -e DB_PASSWORD=XXXXXXX --rm -ti tryton/tryton trytond-console -d tryton_database

Now Powershell displays this :

/usr/lib/python3/dist-packages/passlib/utils/init.py:854: DeprecationWarning: ‘crypt’ is deprecated and slated for removal in Python 3.13
from crypt import crypt as _crypt
:1049: ImportWarning: PluginImportFixer.find_spec() not found; falling back to find_module()
/usr/lib/python3/dist-packages/zeep/utils.py:1: DeprecationWarning: ‘cgi’ is deprecated and slated for removal in Python 3.13
import cgi
/usr/local/lib/python3.11/dist-packages/braintree/dispute.py:83: DeprecationWarning: Use ProtectionLevel enum instead
warnings.warn(“Use ProtectionLevel enum instead”, DeprecationWarning)
/usr/local/lib/python3.11/dist-packages/braintree/search.py:79: DeprecationWarning: Use protection_level parameter instead
warnings.warn(“Use protection_level parameter instead”, DeprecationWarning)
:1049: ImportWarning: PluginImportFixer.find_spec() not found; falling back to find_module()

Then the cursor blinks and I can type but it doesn’t seem to react.
Can I ignore the warnings and type the commands like below please ?

Yes, you should ignore those warnings.

Once the transaction.commit() is finished (will allow you to continue writing in the console) you can exit() and this part of the migration is done!

In other words, if you can type exit() after transaction.commit() the change have been made, otherwise is not completed because it’s writing all the changes, so when it ends to write the transaction, you can write exit()

1 Like

I was able to type exit() but it doesn’t seem to actually exit and go back to “PowerShell prompt”.

Is there a way to confirm that the changes where made please ?
Thank you very much for your help.

You do not seem to have typed into the prompt. Normally it starts with >>>.
I think you are missing the docker run -ti options.

Hello,
the -ti option is there unfortunately.

I’d suggest starting a regular shell first, to verify that everything works as expected. Then, from the shell start trytond-console.

Thanks @philipp.ludwig
Good idea.
I tried but it doesn’t seem to give the expected >>>.

I meant a shell like bash or sh.

But I just see that you are using docker run, that is not going to work to start the tryton shell. Start your tryton container, then use the docker exec command.