Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing pysftp error breaks Odoo website #38

Open
grexe opened this issue Mar 14, 2016 · 5 comments
Open

missing pysftp error breaks Odoo website #38

grexe opened this issue Mar 14, 2016 · 5 comments

Comments

@grexe
Copy link

grexe commented Mar 14, 2016

Using Odoo v9 free and the 9.0 branch on a clean Debian Stretch x64 install, I forgot to install the pysftp module and then wondered why the web page was screwed up, no CSS and other resources were found.

Then I discovered this error in the log, and after installing pysftp, everything was back to normal (phew):

  File "/usr/lib/python2.7/dist-packages/openerp/addons/auto_backup/backup_scheduler.py", line 35, in <module>
raise ImportError('This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)')

ImportError: This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)

This user error really shouldn't break the web site, but instead just logged as a normal error, also right on the auto-backup config-page:

@Yenthe666
Copy link
Owner

Hi @grexe,

Didn't you get a dialog in the beginning when installing this module? By default it should throw up a dialog in Odoo notifying you that you should install PySFTP on your computer first.
See these lines: https://github.com/Yenthe666/auto_backup/blob/8.0/auto_backup/backup_scheduler.py#L30-L33

@grexe
Copy link
Author

grexe commented Mar 15, 2016

No @Yenthe666, I followed the docs and checked out the git repo, installing via console, not the web UI.

I know it's a user error, but that shouldn't break the server in such a way that it doesn't start up... maybe a Odoo/platform issue even?

@Yenthe666
Copy link
Owner

@grexe interesting. If you install a module from the console I assume that the warning is not thrown while there is an issue. I always install mine through the GUI so I've never noticed..
I don't know a quick fix out of the head for this though.

@Yenthe666
Copy link
Owner

@grexe could you please apply this pull request (#39) and test this? This should show you a neat warning in the terminal too if I'm not mistaking.

@luca-vercelli
Copy link

@Yenthe666 I have the same problem. In a fresh install, I have not installed pysftp, then I have updated the modules list, and I have not installed auto-backup. Now, I have restarted Odoo. At this point, Odoo tries to import your module, even if it is not installed, so it crashes. I really think you should avoid "raise ImportError", as suggested here https://stackoverflow.com/questions/42643698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants