Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup error #5

Open
82d opened this issue Dec 11, 2022 · 1 comment
Open

backup error #5

82d opened this issue Dec 11, 2022 · 1 comment

Comments

@82d
Copy link

82d commented Dec 11, 2022

FreeBSD 13.1-RELEASE-p5 GENERIC amd64

hello. installation via pop-3.8. logged in. I entered a phrase into the chat in which the files will fit.
but when starting backup pgpgram backup file - it gives this:

[ 3][t 4][1670717969.865777015][Td.cpp:2668][#1][!MultiTd] Create Td with layer 135, database version 13 and version 35 on 4 threads
[ 3][t 4][1670717969.865826129][Td.cpp:4062][#1][!Td][&td_requests] Sending update: updateOption {
name = "version"
value = optionValueString {
value = "1.8.0"
}
}
split: illegal option -- -
usage: split [-l line_count] [-a suffix_length] [file [prefix]]
split -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file [prefix]]
split -n chunk_count [-a suffix_length] [file [prefix]]
split -p pattern [-a suffix_length] [file [prefix]]
Command '['split', '--bytes', '100MB', '--suffix-length', '6', '-d', '/home/user/.cache/pgpgram/128kbps.pls.gpg', '/home/user/.cache/pgpgram/RQfF1hzh2NKEzhZP8Hpz']' returned non-zero exit status 64.
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/pgpgram/init.py", line 507, in split
out = sh(['split',
File "/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['split', '--bytes', '100MB', '--suffix-length', '6', '-d', '/home/user/.cache/pgpgram/128kbps.pls.gpg', '/home/user/.cache/pgpgram/RQfF1hzh2NKEzhZP8Hpz']' returned non-zero exit status 64.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/user/.local/bin/pgpgram", line 8, in
sys.exit(main())
File "/home/user/.local/lib/python3.8/site-packages/pgpgram/init.py", line 1027, in main
backup = Backup(f, **backup_kwargs)
File "/home/user/.local/lib/python3.8/site-packages/pgpgram/init.py", line 360, in init
self.document["pieces"] = self.split(*split['args'], **split['kwargs'])
File "/home/user/.local/lib/python3.8/site-packages/pgpgram/init.py", line 518, in split
print(out)
UnboundLocalError: local variable 'out' referenced before assignment

I think there is an incompatibility with some utilities of version 111. how to fix it?

@tallero
Copy link
Owner

tallero commented Dec 19, 2022

It seems split may have a slightly different syntax on BSD. You can either:

  • replace your split with the one from GNU coreutils;
  • post a link to BSD split source so we can see if there exists an expression which works for both; if not we can still make PGPgram detect which split is available and run the correct command accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants