Questions tagged [nonetype]

The term Nonetype is used to describe an object or type that possesses a null (none) value.

When using BeautifulSoup, there may be instances where the table element is not always detected, resulting in a 'NoneType' error being returned on occasion

Hello everyone, I am trying to retrieve accurate daily temperatures from www.wunderground.com and encountering the 'NoneType' error occasionally. For instance, the code below attempts to fetch the temperature data from March 1 to March 5, 2020. S ...

Why is it that whenever I execute it, the result is always 'NoneType' object doesn't have the 'append' attribute?

def collatz_list(n): int_list = [n] int_index = n while int_index > 1: if int_index % 2 == 0: int_index = int_index / 2 int_list.append(int_index) else: int_index = 3 * int_index - 1 int_list.append(int_i ...

What could be causing my object to constantly transform into a NoneType?

I am currently developing a Youtube audio sampling program with an object named time_snip that stores the start and end times of a sample in milliseconds. I have encountered a situation where entering the time correctly gives the expected output, but typin ...

Generating prime numbers through recursive functions in Python 2

While attempting to generate prime numbers in Python using recursion, I encountered the issue of lengthy processing time. I realized that an iterative method could be too slow when searching for prime numbers up to one million or more. Below is the code I ...