No that's a misunderstanding of the legal term of art "knowingly".
It is a legal maxim that ignorance of the law is no excuse. A law that has a mens rea (i.e. intent) of "knowingly" refers to some factual circumstance that is one of the elements of the crime.
An example from the New York state penal law:
"156.05 Unauthorized use of a computer.
A person is guilty of unauthorized use of a computer when he or she knowingly uses, causes to be used, or accesses a computer, computer service, or computer network without authorization."
In this case the "knowingly" element is satisfied if you knew (or should have known) that you didn't not have authorization to access the computer, computer service, or computer network.
Similarly for possession statutes, the (sometimes implicit) knowingly element is satisfied if you knew you possessed the given item even if you had no idea possessing it was illegal. A situation where the knowingly element would not be satisfied, is if someone snuck the item into your luggage.
It is a legal maxim that ignorance of the law is no excuse. A law that has a mens rea (i.e. intent) of "knowingly" refers to some factual circumstance that is one of the elements of the crime.
An example from the New York state penal law:
"156.05 Unauthorized use of a computer. A person is guilty of unauthorized use of a computer when he or she knowingly uses, causes to be used, or accesses a computer, computer service, or computer network without authorization."
In this case the "knowingly" element is satisfied if you knew (or should have known) that you didn't not have authorization to access the computer, computer service, or computer network.
Similarly for possession statutes, the (sometimes implicit) knowingly element is satisfied if you knew you possessed the given item even if you had no idea possessing it was illegal. A situation where the knowingly element would not be satisfied, is if someone snuck the item into your luggage.