Pro.py isn't working in Seafile 7.1 Pro (beta)

Hi there,

I can not clear and rebuild the full text search with the pro.py file. I am getting the following error:

~ $ ./pro/pro.py search --clear
Delete seafile search index ([y]/n)?
Delete search index, this may take a while…
Traceback (most recent call last):
File “./pro/pro.py”, line 819, in
main()
File “./pro/pro.py”, line 816, in main
args.func(args)
File “./pro/pro.py”, line 704, in handle_search_commands
delete_search_index()
File “./pro/pro.py”, line 744, in delete_search_index
Utils.run_argv(argv, env=get_seafes_env())
File “./pro/pro.py”, line 112, in run_argv
env=env)
File “/usr/lib/python3.7/subprocess.py”, line 775, in init
restore_signals, start_new_session)
File “/usr/lib/python3.7/subprocess.py”, line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘python’: ‘python’

Some research shows this particular error occours if the “system python” is used instead of shipping its own. With Seafile 7.1 Pro (beta) and Python 3 this is the case.

I am testing on Debian Buster. Anyone who can reproduce and eventually confirm this behaviour?

I did some further investigations. The error message above was thrown because I completely removed Python2.7 from my test system. Reinstalling it throws another error:

/usr/bin/python2.7: cannot import name ConverterMapping

This seems right to me since Sefile 7.1 doesn’t ship Python2.7 binaries anymore.
So my guess is, that pro.py is not fully compatible with Python3

Hopefully this is fixed in their next release.

We can’t reproduce the problem yet. What operating system do you use?

I am using Debian 10. I even set up a second fresh Debian 10 VM with a fresh Seafile 7.1.0 Pro installation (installing all the prerequisites given here) and got the same error.

If I manually add a symbolic link for the “old python” with

ln -s /usr/bin/python3.7 /usr/bin/python

it actually works… But why pro.py does not use the right binaries on its own?

Furthermore I saw you now use io.StringIO in pro/python/seafes/extract.py since the python module cStringIO was removed in Python3. But indexing docx,pptx,xlsx files still ends up with the following error:

initial_value must be str or None, not bytes

At the moment there is no full text search for docx,pptx,xlsx files. Are you aware of this?

1 Like

It will be fixed in the next release.

2 Likes