A polytropic process is a process that obeys the relation $pV^n=C.$ However, when I try to solve a problem involving this relationship with, for example, $n = 1.5$ my use of units in my equations breaks down. At some point, I find myself having to solve for the constant $C$ to evaluate the integral which in the case of $n = 1.5$ gives the constant $C$ with the units $\mathrm{\frac{kg\cdot m^{3.5}}{s^2}}$ and does not match up with the expected units for energy. (Assuming units of $\mathrm{m^3}$ for $V$ and units of $\mathrm{\frac{kg}{m\cdot s^2}}$ for $p$.)
Usually I drop the units entirely at this point and arrive at the correct answer regardless, but this does not feel like a rigorous solution. How would I avoid this contradiction in my dimensional analysis, and why does it exist?