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

Module not callable #72

Open
PeterCLarsen opened this issue Sep 12, 2022 · 1 comment
Open

Module not callable #72

PeterCLarsen opened this issue Sep 12, 2022 · 1 comment

Comments

@PeterCLarsen
Copy link

Working through the Automate the Boring stuff book and came across Send2Trash. Tried following the tutorial but found that the module was not callable.

my code is

send to trash

I am doing this in VSCode and pylint keeps giving the error that the module is not callable:

I have tried reinstalling send2trash and restarting the computer.

@npanuhin
Copy link

@TeddySledge, you should use:

from send2trash import send2trash
send2trash("myfile.txt")

or

import send2trash
send2trash.send2trash("myfile.txt")

but you are importing and calling the whole module:

import send2trash
send2trash("myfile.txt")  # Exception

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

2 participants