Bug#963320: libtgvoip: FTBFS: AttributeError: module 'string' has no attribute 'maketrans'
Le 06/11/2020 à 22:23, Nicholas Guriev a écrit : > On Fri, 2020-11-06 at 22:06 +0100, Xavier wrote: >> sorry, I launched a full rebuild in unstable and didn't see this change. >> However I don't understand this error (I'm not Python dev), code is: >> >> try: >> # maketrans moved to str in python3. >> _maketrans = string.maketrans >> except NameError: >> _maketrans = str.maketrans >> >> So error should be discarded, isn't it? > > It seems wrong exception is handled here. NameError[1] happens when > unknown top-level variable is referenced. However, above this line, > there is importing of string module. So NameError is not possible here. > I daresay an original author meant AttributeError[2] here that is raised > when code is trying to get non-existent attribute (a thing after dot). > > I suggest replace NameError with AttributeError: > >try: > # maketrans moved to str in python3. > _maketrans = string.maketrans >except AttributeError: > _maketrans = str.maketrans > > (not tested) I tried but now I've a new error: Traceback (most recent call last): File "/usr/bin/gyp", line 11, in load_entry_point('gyp==0.1', 'console_scripts', 'gyp')() File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 552, in script_main return main(sys.argv[1:]) File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 545, in main return gyp_main(args) File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 530, in gyp_main generator.GenerateOutput(flat_list, targets, data, params) File "/usr/lib/python3/dist-packages/gyp/generator/cmake.py", line 1238, in GenerateOutput GenerateOutputForConfig(target_list, target_dicts, data, File "/usr/lib/python3/dist-packages/gyp/generator/cmake.py", line 1194, in GenerateOutputForConfig WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use, File "/usr/lib/python3/dist-packages/gyp/generator/cmake.py", line 990, in WriteTarget for xcode_setting, xcode_value in xcode_settings.viewitems(): AttributeError: 'dict' object has no attribute 'viewitems'
Bug#963320: libtgvoip: FTBFS: AttributeError: module 'string' has no attribute 'maketrans'
On Fri, 2020-11-06 at 22:06 +0100, Xavier wrote: > sorry, I launched a full rebuild in unstable and didn't see this change. > However I don't understand this error (I'm not Python dev), code is: > > try: > # maketrans moved to str in python3. > _maketrans = string.maketrans > except NameError: > _maketrans = str.maketrans > > So error should be discarded, isn't it? It seems wrong exception is handled here. NameError[1] happens when unknown top-level variable is referenced. However, above this line, there is importing of string module. So NameError is not possible here. I daresay an original author meant AttributeError[2] here that is raised when code is trying to get non-existent attribute (a thing after dot). I suggest replace NameError with AttributeError: try: # maketrans moved to str in python3. _maketrans = string.maketrans except AttributeError: _maketrans = str.maketrans (not tested) [1]: https://docs.python.org/3/library/exceptions.html#NameError [2]: https://docs.python.org/3/library/exceptions.html#AttributeError signature.asc Description: This is a digitally signed message part
Bug#963320: libtgvoip: FTBFS: AttributeError: module 'string' has no attribute 'maketrans'
Le 06/11/2020 à 19:08, Nicholas Guriev a écrit : > On Thu, 2020-11-05 at 06:27 +0100, Xavier wrote: >> I'm unable to reproduce the bug: libtgvoip build works fine here. Could >> you verify that the bug still exists? >> >> Cheers, >> Xavier > > Xavier, which version of the libtgvoip package did you try to build? The > bug is reproducible with 2.4.4-2 as stated in the start message in this > thread. Newer versions do not depend on GYP. But the issue is still > present. Minimal example needs almost nothing: > >mymedia@barberry:~$ gyp --format=cmake --depth=. - < /dev/null >Traceback (most recent call last): > File "/usr/bin/gyp", line 11, in >load_entry_point('gyp==0.1', 'console_scripts', 'gyp')() > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 552, in > script_main >return main(sys.argv[1:]) > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 545, in main >return gyp_main(args) > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 518, in > gyp_main >[generator, flat_list, targets, data] = Load( > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 98, in Load >generator = __import__(generator_name, globals(), locals(), > generator_name) > File "/usr/lib/python3/dist-packages/gyp/generator/cmake.py", line 43, > in >_maketrans = string.maketrans >AttributeError: module 'string' has no attribute 'maketrans' >mymedia@barberry:~$ Hi, sorry, I launched a full rebuild in unstable and didn't see this change. However I don't understand this error (I'm not Python dev), code is: try: # maketrans moved to str in python3. _maketrans = string.maketrans except NameError: _maketrans = str.maketrans So error should be discarded, isn't it?
Bug#963320: libtgvoip: FTBFS: AttributeError: module 'string' has no attribute 'maketrans'
On Thu, 2020-11-05 at 06:27 +0100, Xavier wrote: > I'm unable to reproduce the bug: libtgvoip build works fine here. Could > you verify that the bug still exists? > > Cheers, > Xavier Xavier, which version of the libtgvoip package did you try to build? The bug is reproducible with 2.4.4-2 as stated in the start message in this thread. Newer versions do not depend on GYP. But the issue is still present. Minimal example needs almost nothing: mymedia@barberry:~$ gyp --format=cmake --depth=. - < /dev/null Traceback (most recent call last): File "/usr/bin/gyp", line 11, in load_entry_point('gyp==0.1', 'console_scripts', 'gyp')() File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 552, in script_main return main(sys.argv[1:]) File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 545, in main return gyp_main(args) File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 518, in gyp_main [generator, flat_list, targets, data] = Load( File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 98, in Load generator = __import__(generator_name, globals(), locals(), generator_name) File "/usr/lib/python3/dist-packages/gyp/generator/cmake.py", line 43, in _maketrans = string.maketrans AttributeError: module 'string' has no attribute 'maketrans' mymedia@barberry:~$ -- I sent this message yesterday, but it does not seem to have been delivered. At least, I do not see it on web-pages at bugs.d.o. So I have to resend the email, sorry if it reaches you twice. signature.asc Description: This is a digitally signed message part
Bug#963320: libtgvoip: FTBFS: AttributeError: module 'string' has no attribute 'maketrans'
Control: tags -1 + moreinfo Hi, I'm unable to reproduce the bug: libtgvoip build works fine here. Could you verify that the bug still exists? Cheers, Xavier
Bug#963320: libtgvoip: FTBFS: AttributeError: module 'string' has no attribute 'maketrans'
reassign 963320 gyp found 963320 0.1+20200513gitcaa6002-1 affects 963320 src:libtgvoip stop On Sun, 2020-06-21 at 22:04 +0200, Lucas Nussbaum wrote: > Hi, > > During a rebuild of all packages in sid, your package failed to build > on amd64. > > Relevant part (hopefully): > > make[1]: Entering directory '/<>' > > gyp --format=cmake --depth=. --generator-output=. -Gconfig=Release > > -Goutput_dir=obj-x86_64-linux-gnu > > -Dlinux_path_opus_include=/usr/include/opus > > Traceback (most recent call last): > > File "/usr/bin/gyp", line 11, in > > load_entry_point('gyp==0.1', 'console_scripts', 'gyp')() > > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 552, in > > script_main > > return main(sys.argv[1:]) > > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 545, in main > > return gyp_main(args) > > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 518, in > > gyp_main > > [generator, flat_list, targets, data] = Load( > > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 98, in Load > > generator = __import__(generator_name, globals(), locals(), > > generator_name) > > File "/usr/lib/python3/dist-packages/gyp/generator/cmake.py", line 43, in > > > > _maketrans = string.maketrans > > AttributeError: module 'string' has no attribute 'maketrans' > > make[1]: *** [debian/rules:30: override_dh_auto_configure] Error 1 > > The full build log is available from: >http://qa-logs.debian.net/2020/06/20/libtgvoip_2.4.4-2_unstable.log > > A list of current common problems and possible solutions is available at > http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! > > About the archive rebuild: The rebuild was done on EC2 VM instances from > Amazon Web Services, using a clean, minimal and up-to-date chroot. Every > failed build was retried once to eliminate random failures. The bug is not in the libtgvoip package itself but apparently caused by incomplete porting GYP to Python 3. Dear GYP maintainer, please fix CMake generator, switch it to built-in str.maketrans. I am already working on a new version of the libtgvoip package. It will not use GYP and not solve the actual issue in the build tool.
Bug#963320: libtgvoip: FTBFS: AttributeError: module 'string' has no attribute 'maketrans'
Source: libtgvoip Version: 2.4.4-2 Severity: serious Justification: FTBFS on amd64 Tags: bullseye sid ftbfs Usertags: ftbfs-20200620 ftbfs-bullseye Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > make[1]: Entering directory '/<>' > gyp --format=cmake --depth=. --generator-output=. -Gconfig=Release > -Goutput_dir=obj-x86_64-linux-gnu -Dlinux_path_opus_include=/usr/include/opus > Traceback (most recent call last): > File "/usr/bin/gyp", line 11, in > load_entry_point('gyp==0.1', 'console_scripts', 'gyp')() > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 552, in > script_main > return main(sys.argv[1:]) > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 545, in main > return gyp_main(args) > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 518, in gyp_main > [generator, flat_list, targets, data] = Load( > File "/usr/lib/python3/dist-packages/gyp/__init__.py", line 98, in Load > generator = __import__(generator_name, globals(), locals(), > generator_name) > File "/usr/lib/python3/dist-packages/gyp/generator/cmake.py", line 43, in > > _maketrans = string.maketrans > AttributeError: module 'string' has no attribute 'maketrans' > make[1]: *** [debian/rules:30: override_dh_auto_configure] Error 1 The full build log is available from: http://qa-logs.debian.net/2020/06/20/libtgvoip_2.4.4-2_unstable.log A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! About the archive rebuild: The rebuild was done on EC2 VM instances from Amazon Web Services, using a clean, minimal and up-to-date chroot. Every failed build was retried once to eliminate random failures.