0

I am trying to use the external library of whois but i am getting the error [WinError 2] The system cannot find the file specified I have included the package in my settings file. Here is the code for views:

class PreviousSearchView(View):
    def post(self, request):
        if request.method == 'POST':
            searchdomain = request.POST['searchdomain']
            domain = whois.query(searchdomain)           ##### Error on this line
            date = datetime.datetime.now()
            print(domain)
            search = Search(
                searchdomain = searchdomain,
                date = date,
                user = User.objects.get(id = request.user.id)
            )
            search.save()
            return redirect('/')
indianLeo
  • 153
  • 1
  • 11
  • it seems many peoples have the same problem. according to its [github_issue_page](http://github.com/DannyCork/python-whois/issues) – Saeed Ramezani Feb 22 '21 at 10:21

1 Answers1

0

The whois package is for linux if you are using windows try python-whois.

indianLeo
  • 153
  • 1
  • 11