Error while mass subscribe using simplenews I get this error while i am trying to mass subscribe users/email for a newsletter using the simplenews module in D7. How can i solve this error ?

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 
'tid' cannot be null: INSERT INTO {simplenews_subscription} 
(tid, snid, status, timestamp, source) VALUES 
(:db_insert_placeholder_0, :db_insert_placeholder_1, 
:db_insert_placeholder_2, 
:db_insert_placeholder_3, :db_insert_placeholder_4); 
Array ( [:db_insert_placeholder_0] =&gt; 
[:db_insert_placeholder_1] =&gt; 1285 
[:db_insert_placeholder_2] =&gt; 1 
[:db_insert_placeholder_3] =&gt; 1368003712 
[:db_insert_placeholder_4] =&gt; ) 
in simplenews_subscription_save() 
(line 1501 of /sites/all/modules/simplenews/simplenews.module).
You are getting this error because when it is trying to insert the taxonomy term ID:

INSERT INTO {simplenews_subscription} (tid ...


The value that is being passed is null:

Array ( [:db_insert_placeholder_0] =&gt; 


Best plan to fix this is to try and determine why it is not passing this taxonomy term. Did you select the term as an option when mass subscribing? This may be a bug or quirk in simplenews itself according to this thread or maybe an issue with corruption of your dataset. 

Another way to resolve this if that is the case would be to alter that column to allow nulls (temporarily!), do your mass subscription action, manually add the correct taxonomy term to the database and then finish by restoring the null constraint to the column.