5

When I'm running print(cursor.fetchone()) (pyodbc package) I have the following warning:

main.py:33: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead

Is that normal ? The datatype I'm trying to fetch is the following: enter image description here

I'm using Python 3.10.2 and MSSQL.

Thanks!

6
  • Sounds like you're making a bug report. You should be posting that on PyODBC's github. Commented Feb 10, 2022 at 14:55
  • 1
    github.com/mkleehammer/pyodbc/pull/1002 Commented Feb 10, 2022 at 16:30
  • @GordThompson I tried reading the post but I don't understand anything they say. Could you explain the way to fix it? I'm not sure I understand. Sorry if it's quite a naive question, I'm pretty new to coding! Commented Feb 10, 2022 at 18:19
  • 2
    The link above is a GitHub Pull Request (PR). It indicates that the issue is known and someone has proposed a fix. If the PR is accepted then the change will be merged into the code base and be included in the next release of the package. In the meantime, you could tell your code to suppress such warnings using the techniques in the answers to this question. And if you want to indicate that the change is of interest to you then consider logging into GitHub and giving the PR a "thumbs up". Commented Feb 10, 2022 at 19:04
  • 1
    github.com/mkleehammer/pyodbc/issues/… Commented Feb 10, 2022 at 19:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.