Python Forum
[CPython] Can't run script python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[CPython] Can't run script python
#3
(May-21-2022, 04:21 PM)Gribouillis Wrote: Clearly the list interp->codec_search_path is empty and the code expected this list to have been populated by some other part of the code. I suggest to grep codec_search_path in the source tree to find where it should be populated.

Apart from that, the value '/' for sys.executable looks invalid because this variable normally contains the path to the python command.

Thanks for your suggestion.

I have found the following logic to append value to codec_search_path.
int PyCodec_Register(PyObject *search_function)
{
...
return PyList_Append(interp->codec_search_path, search_function); // <==== Set breakpoint
...
}

Tried setting breakpoint here, but it does not hit. It seems there is something wrong causes logic of append is not called.
I'm working on it.
Gribouillis likes this post
Reply


Messages In This Thread
[CPython] Can't run script python - by VietVH - May-21-2022, 03:32 PM
RE: [CPython] Can't run script python - by VietVH - May-21-2022, 04:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,288 Jun-29-2023, 11:57 AM
Last Post: gologica
  ImportError: /home/ali/Documents/test/charm/core/crypto/AES.cpython-39-x86_64-linux-g Anldra12 0 1,240 Apr-28-2022, 07:13 AM
Last Post: Anldra12
  Reducing runtime memory usage in Cpython interpreter david_the_graower 2 2,227 Oct-18-2021, 09:56 PM
Last Post: david_the_graower
  Navigating cpython source using python quazirfan 3 2,037 Aug-09-2021, 07:52 PM
Last Post: quazirfan
  IronPython from CPython amasis 3 2,219 Feb-05-2021, 12:26 PM
Last Post: jefsummers
  ImportError: /home/pybind11_example.cpython-37m-x86_64-linux-gnu.so: undefined symbol chaitra 2 5,129 Feb-03-2021, 05:14 AM
Last Post: chaitra
  How to kill a bash script running as root from a python script? jc_lafleur 4 5,941 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  crontab on RHEL7 not calling python script wrapped in shell script benthomson 1 2,315 May-28-2020, 05:27 PM
Last Post: micseydel
  compiled cpython output wrong version bigrockcrasher 0 1,516 Feb-25-2020, 06:31 PM
Last Post: bigrockcrasher
  Package python script which has different libraries as a single executable or script tej7gandhi 1 2,640 May-11-2019, 08:12 PM
Last Post: keames

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020