Series error: First argument is not a valid variable?

See my following testing:

In[140]:= Limit[(1+ I \[Theta]/x)^x,x->Infinity]/.{I \[Theta]->x}
Series[%, {x, 0, 10}]/.{x-> I \[Theta]}

Out[140]= E^x

During evaluation of In[140]:= SeriesData::sdatv: First argument I \[Theta] is not a valid variable.

Out[141]= SeriesData[Complex[0, 1] \[Theta], 0, {1, 1, 
Rational[1, 2], 
Rational[1, 6], 
Rational[1, 24], 
Rational[1, 120], 
Rational[1, 720], 
Rational[1, 5040], 
Rational[1, 40320], 
Rational[1, 362880], 
Rational[1, 3628800]}, 0, 11, 1]

Why will the “SeriesData::sdatv: First argument I [Theta] is not a valid variable.” be triggered in this case, and how to fix it?

Regards,
Zhao

You changed the variable x to I θ, which is Times[I, θ]. Variable cannot have the head Times.

I don’t know how to fix it, because I am unsure what you wish to accomplish. However, the following avoids the error:

Series[% /. {x -> I \[Theta]}, {\[Theta], 0, 10}]

But you still use the same rule {x → I [Theta]}, why can this problem be avoided?

I used \[Theta] for the variable in Series. I used the replacement only on the function, that is, the first argument of Series. You used the replacement on the whole Series with the variable initially as x. Your use of the replacement causes the variable to become Times[I, θ]. Examine the difference in our codes carefully.

I see. Thank you for your detailed explanation.