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

Can't install: AttributeError: 'NoneType' object has no attribute 'rfind' #33

Closed
hellais opened this issue Oct 16, 2016 · 6 comments
Closed

Comments

@hellais
Copy link
Member

hellais commented Oct 16, 2016

This was reported on: dugsong/pypcap#49.

There seem to be some reported fixes in there we could integrate into our setup.py

@bassosimone
Copy link
Contributor

Also noticed this on macOS 10.12.1 (Sierra) and fixed it by installing dupes/libpcap with homebrew.

Here is the stacktrace of the error I was getting:

  Using cached pypcap-1.1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Found pcap headers in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pcap/pcap.h
    Found libraries in None
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/bl/r84rmchd6c5848k6gxvvky_m0000gn/T/pip-build-oPKzJ5/pypcap/setup.py", line 59, in <module>
        lib_file = os.path.basename(lib_file_path)
      File "/XXXX/fff/bin/../lib/python2.7/posixpath.py", line 114, in basename
        i = p.rfind('/') + 1
    AttributeError: 'NoneType' object has no attribute 'rfind'

@ivandov
Copy link

ivandov commented Mar 8, 2017

+1 Also have this issue installying pypcap on OSX 10.12.3

@hellais
Copy link
Member Author

hellais commented Mar 22, 2017

I believe this should be fixed in the current master. If you could check that is indeed the case this would be very useful.

I plan to anyways make a long due new release and push to pypi that should address this.

@ghost
Copy link

ghost commented May 16, 2017

I have the same problem on ubuntu16.04,python 2.7 and i solve this problem by "apt-get install libpcap-dev"

@hellais
Copy link
Member Author

hellais commented May 16, 2017

I have the same problem on ubuntu16.04,python 2.7 and i solve this problem by "apt-get install libpcap-dev"

Yes libpcap-dev is in fact a dependency of pypcap as is listed in the Readme. We should probably provide a better error message when this happens in the setup.py though. I filed an issue for that last thing here: #51.

@hellais
Copy link
Member Author

hellais commented Nov 21, 2017

This fix is now shipped as part of 1.2.0

@hellais hellais closed this as completed Nov 21, 2017
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