7. The solution set of the inequality $\left|\frac{1}{\log _{\frac{1}{3}} x+1}\right|>\frac{1}{3}$ is ( ).
(A) $\left(\frac{1}{9}, 81\right)$
(B) $\left(\frac{1}{3}, 3\right) \cup(3,27)$
(C) $\left(\frac{1}{3}, 27\right)$
(D) $\left(\frac{1}{9}, 3\right) \cup(3,81)$
7.D.

The original inequality is
$$
\left\{\begin{array}{l}
\log _{\frac{1}{3}} x+1 \neq 0, \\
\left|\log _{\frac{1}{3}} x+1\right| > 0, \text{ and } x \neq 3.
\end{array}\right.
$$
From equation (2), we get $-3 < \log _{\frac{1}{3}} x+1 < 3$, then
$$
\left(\frac{1}{3}\right)^{2} < x < \left(\frac{1}{3}\right)^{-4} \text{. }
$$

That is, $\frac{1}{9} < x < 81$.
Therefore, the solution set of the original inequality is $\left(\frac{1}{9}, 3\right) \cup (3, 81)$.