"I do not see him but her."
Translation:Já nevidím jeho, ale ji.
It is all about the stress and here about the word before "ale". I know it is difficult. A native speaker just feels there is something missing in the sentence.
The word before ale is "jeho": we are contrasting "him" with "her". "Nevidím jeho, ale ji."
The word before ale is "nevidím": we are contrasting "not seeing" with "seeing". So grammatically possible: "Jeho nevidím, ale ji vidím." "Jeho nevidím, ale ji ano." "Jeho nevidím, ale vidím ji."(the least natural, requires strong stress on ji)
I think that in this very case the only possible form would be exactly jeho instead of ho (and ji instead of ni respectively) because you're emphasizing who you're not seeing. The closest structure in English I can think of is "It's not him who I see, but her".
The same applies to my native Bulgarian when I translate the Czech sentence: Не виждам него, а нея. (Не него виждам, а нея. is even a stronger alternative). In this case you'd use both него (cz. jeho) and нея (ji) instead of their shorter counterparts го (ho) and я (ni) because you have the opposing structure [not (someone), but (someone else)].
Even a clearer way to illustrate it is using Italian (given that you're level 11 in it): Non vedo lui, ma lei. (lui inst. of lo, and lei inst. of la).
French, however, doesn't seem to have the same structure Italian does, and thus gets closer to the English way of saying it: Ce n'est pas lui que je vois, mais elle. (Je ne vois pas lui, mais elle. doesn't sound natural French to me).
However, this is only a guess by comparing both languages (given that they are Slavic), so it is best that a native speaker check it (or czech, if you may, lol).
"Nevidím ho." on its own as a standalone sentence is fine.
"Nevidím ho, ale ji." is not, because here we are stressing the pronoun so it must be "jeho". We are stressing because we are contrasting it with "ji".
Yes, "ho" comes to the second position, but that is not a magical rule that would native speakers invent to annoy foreign learners. The point is it is about stress. "Ho" is used in an unstressed position. The "second position" rule is only an aid to help you to find or identify the unstressed position in the sentence.