The error is telling you that at least one of the files has a non-numeric character in the second column.
Using list.files(pattern='*.txt') is convenient but dangerous. It is dangerous because it can easily include files that are not htseq output files and because, even if it selects the right files, you don't have any control over the order of files.
In this case, you might have one or more .txt files in the directory that are not a htseq-count output files. Have you checked that?
No, the message about meta tags is not a "warning". It's just an informative message. If it was a warning, then it would include the word: "Warning:".
The message alerts you to the fact that you will need to remove the meta tag rows from the DGEList object before you do any analysis.
To see how to add gene symbols to your annotation, follow the documentation in any example workflow. This will of course depend on what annotation you are using now, which is something you haven't told us.
I see, now I get this warning
Meta tags detected: __no_feature, __ambiguous, __too_low_aQual, __not_aligned, __alignment_not_unique
I have a question, how can i change the annotation to gene name by your package?
No, the message about meta tags is not a "warning". It's just an informative message. If it was a warning, then it would include the word: "Warning:".
The message alerts you to the fact that you will need to remove the meta tag rows from the DGEList object before you do any analysis.
To see how to add gene symbols to your annotation, follow the documentation in any example workflow. This will of course depend on what annotation you are using now, which is something you haven't told us.