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

ImportError: cannot import name 'find_strings' #39

Closed
na-sa-do opened this issue Apr 6, 2017 · 6 comments
Closed

ImportError: cannot import name 'find_strings' #39

na-sa-do opened this issue Apr 6, 2017 · 6 comments

Comments

@na-sa-do
Copy link

na-sa-do commented Apr 6, 2017

$ truffleHog
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/bin/truffleHog", line 7, in <module>
    from truffleHog.truffleHog import main
  File "/usr/local/lib/python3.6/site-packages/truffleHog/__init__.py", line 1, in <module>
    from truffleHog import find_strings
ImportError: cannot import name 'find_strings'
$ uname -a
Darwin helium.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
$ python3 --version
Python 3.6.1
@bbriggs
Copy link

bbriggs commented Apr 7, 2017

Deployed a virtualenv with Python2 and used that instead. Worked like a champ.

@0xdevalias
Copy link

0xdevalias commented May 4, 2017

Same issue, 3.5.2

⇒  trufflehog .
Traceback (most recent call last):
  File "/Users/devalias/.pyenv/versions/3.5.2/bin/trufflehog", line 7, in <module>
    from truffleHog.truffleHog import main
  File "/Users/devalias/.pyenv/versions/3.5.2/lib/python3.5/site-packages/truffleHog/__init__.py", line 1, in <module>
    from truffleHog import find_strings
ImportError: cannot import name 'find_strings'

Edit: See #38

@bbriggs
Copy link

bbriggs commented May 4, 2017

@dxa4481 claims that python3 support is working, but multiple people are reporting issues with 3.5, which he says he's unable to reproduce.

Why don't we help him repro the issue so we can get it fixed? I'd like to see this fully 2/3 compatible (and on pypi!)

@0xdevalias
Copy link

Notes:

import find_strings

from truffleHog import find_strings

find_strings()

Oh.. I wonder.. this could be a filename case issue.. Ran into something similar before on another project..

@ViKomprenas appears to be on OSX, and I definitely was.

Although I suppose that wouldn't really account for python 2 working probably.. ponders

@xiuliren
Copy link

xiuliren commented Jun 6, 2017

I get the same error with python 3.6 and anaconda3 in ubuntu 14.04

@xiuliren
Copy link

xiuliren commented Jun 6, 2017

Simply delete the error code line works
https://github.com/dxa4481/truffleHog/blob/master/truffleHog/__init__.py#L1
find_strings is just a function, should not be imported.

@dxa4481 dxa4481 closed this as completed Jun 20, 2017
dustin-decker pushed a commit that referenced this issue Apr 3, 2022
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.54.3 to 0.54.4.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](xanzy/go-gitlab@v0.54.3...v0.54.4)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants