title: How do i solve" missing 1 required positional argument "
body: <p>I wrote a method in class and got the following error</p>
  
  <pre><code>yearLinks = link(root_url + '/oilmarketreport/reports/')
  TypeError: link() missing 1 required positional argument: 'url'
  </code></pre>
  
  <p>My code is:- </p>
  
  <pre><code>class Data:
      def __init__(self):
          try: ------
               ----
          else:
  
   def link(self, url):
  
          all_links = []
          page = requests.get(url)
          soup = BeautifulSoup(page.text, 'html.parser')
          for href in soup.find_all(class_='omrlist'):
              all_links.append(root_url + href.find('a').get('href'))
          return all_links
   yearLinks = link(root_url + '/oilmarketreport/reports/')
   reportLinks = []
   for url in yearLinks:
       links = link(url)
  </code></pre>
  
  <p>So how i solve this in python.</p>