Install on windows can't find /etc/resolv.conf

Bug #1694400 reported by Adrian Stephens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
py3dns
Confirmed
Medium
Unassigned

Bug Description

PyCharm, Python 3.6.0 virtualenv, Windows 10 host.
Attempted installation of py3dns using version current as of 2016-05-30 produces:
collecting py3dns
  Downloading py3dns-3.1.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\adrians\AppData\Local\Temp\pycharm-packaging\py3dns\setup.py", line 7, in <module>
        import DNS
      File "C:\Users\adrians\AppData\Local\Temp\pycharm-packaging\py3dns\DNS\__init__.py", line 37, in <module>
        Base._DiscoverNameServers()
      File "C:\Users\adrians\AppData\Local\Temp\pycharm-packaging\py3dns\DNS\Base.py", line 84, in _DiscoverNameServers
        return ParseResolvConf()
      File "C:\Users\adrians\AppData\Local\Temp\pycharm-packaging\py3dns\DNS\Base.py", line 52, in ParseResolvConf
        with open(resolv_path, 'r') as stream:
    FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf'

    ----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\adrians\AppData\Local\Temp\pycharm-packaging\py3dns\

=================
As Windows doesn't provide an /etc/resolv.conf, it is not surprising that it didn't find it.

Revision history for this message
Scott Kitterman (kitterman) wrote :

I'll be glad to include a fix for this from someone who uses Windows, but as a non-Windows person, there's no way I can develop a solution.

Changed in py3dns:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Scott Kitterman (kitterman) wrote :

The real issue in this bug is that the Windows specific name server detection didn't work. According to the Python documentation, the platform value is correct, so still no way to work on this. In version 4.0.0, the behavior will change so that if resolv.conf is missing, DNS will assume that the DNS server is 127.0.0.1. That will change what happens in this situation. No idea if it will help.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.