question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name deletetweets

See original GitHub issue

whenever I try to execute delete-tweets it raises the following error:

Traceback (most recent call last):
  File "env/bin/delete-tweets", line 5, in <module>
    from deletetweets.__main__ import main
  File "/Users/carlos.vega/Documents/deletetweets/twitter-2019-12-08/env/lib/python2.7/site-packages/deletetweets/__main__.py", line 7, in <module>
    from deletetweets import deletetweets
ImportError: cannot import name deletetweets

Either from a virtualenv or system wide.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
sschoenithcommented, Dec 10, 2019

I was able to fix this by:

  • navigating to deletetweets location pip install location (for me, /usr/local/lib/python2.7/dist-packages/deletetweets)
  • open main.py
  • comment out line 7
  • add “import deletetweets” on line 8
  • re run deletetweets

That being said, its probably not a proper fix… but it works.

1reaction
koenrhcommented, Dec 29, 2019

My apologies for the delay.

As Python 2 is reaching end of life in just two days, could you try using Python 3? If you already have Python3 installed: uninstall the package, and then force the package to be installed using Python 3 python3 -m pip delete-tweets.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I solve ImportError: cannot import name 'Tweet' from ...
Solution -: Rename your Tweet.py to another name which not belongs to any class type. If above solution didn't work, please post the...
Read more >
ImportError: No module named twitter · Issue #19 - GitHub
... I tried to delete tweets and got the following error message: File "deletetweets.py", line 8, in import twitter ImportError: No module named...
Read more >
Import error for gen_rul_payload from searchtweets
I have installed searchtweets but it is showing error while importing ImportError: cannot import name 'gen_rule_payload' from 'searchtweets'
Read more >
How to Make a Twitter Bot in Python With Tweepy
In this article, you'll learn how to make your own Twitter Bot in Python with Tweepy, a package that provides a very convenient...
Read more >
ImportError: cannot import name 'LinkToken' from 'brownie'
I am working with the tutorial by freecodecamp.org and have the following error: ImportError: cannot import name 'LinkToken' from 'brownie ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found