crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 275 forks source link

AttributeError: module 'crossbar' has no attribute '__version__' #2077

Closed janrinze closed 1 year ago

janrinze commented 1 year ago

AttributeError: module 'crossbar' has no attribute 'version'

I get this error when starting the latest version of crossbar.

It seems the python module version is not yet imported when other modules want to use the version string...

2023-05-08T13:36:30+0200 [Router     3101460] Traceback (most recent call last):
2023-05-08T13:36:30+0200 [Router     3101460]   File "<frozen runpy>", line 198, in _run_module_as_main
2023-05-08T13:36:30+0200 [Router     3101460]   File "<frozen runpy>", line 88, in _run_code
2023-05-08T13:36:30+0200 [Router     3101460]   File "/home/crossbario/crossbar/crossbar/worker/main.py", line 375, in <module>
2023-05-08T13:36:30+0200 [Router     3101460]     _run_command_exec_worker(args)
2023-05-08T13:36:30+0200 [Router     3101460]   File "/home/crossbario/crossbar/crossbar/worker/main.py", line 167, in _run_command_exec_worker
2023-05-08T13:36:30+0200 [Router     3101460]     _mod = importlib.import_module(personality_module)
2023-05-08T13:36:30+0200 [Router     3101460]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-05-08T13:36:30+0200 [Router     3101460]   File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
2023-05-08T13:36:30+0200 [Router     3101460]     return _bootstrap._gcd_import(name[level:], package, level)
2023-05-08T13:36:30+0200 [Router     3101460]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-05-08T13:36:30+0200 [Router     3101460]   File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
2023-05-08T13:36:30+0200 [Router     3101460]   File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
2023-05-08T13:36:30+0200 [Router     3101460]   File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
2023-05-08T13:36:30+0200 [Router     3101460]   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
2023-05-08T13:36:30+0200 [Router     3101460]   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2023-05-08T13:36:30+0200 [Router     3101460]   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2023-05-08T13:36:30+0200 [Router     3101460]   File "/home/crossbario/crossbar/crossbar/personality.py", line 20, in <module>
2023-05-08T13:36:30+0200 [Router     3101460]     from crossbar.worker.router import RouterController
2023-05-08T13:36:30+0200 [Router     3101460]   File "/home/crossbario/crossbar/crossbar/worker/router.py", line 25, in <module>
2023-05-08T13:36:30+0200 [Router     3101460]     from crossbar.worker.transport import TransportController, RouterTransport
2023-05-08T13:36:30+0200 [Router     3101460]   File "/home/crossbario/crossbar/crossbar/worker/transport.py", line 33, in <module>
2023-05-08T13:36:30+0200 [Router     3101460]     twisted.web.server.version = "Crossbar/{}".format(crossbar.__version__)
2023-05-08T13:36:30+0200 [Router     3101460]                                                       ^^^^^^^^^^^^^^^^^^^^
2023-05-08T13:36:30+0200 [Router     3101460] AttributeError: module 'crossbar' has no attribute '__version__'
2023-05-08T13:36:31+0200 [Controller 3101439] Native worker connection closed uncleanly: A process has ended with a probable error condition: process ended with exit code 1.
2023-05-08T13:36:31+0200 [Controller 3101439] Failed to start native worker: A process has ended with a probable error condition: process ended with exit code 1.
2023-05-08T13:36:31+0200 [Controller 3101439] Could not start node: Traceback (most recent call last):
--- <exception caught here> ---
  File "/home/crossbario/crossbar/crossbar/node/node.py", line 457, in start
    res = yield self.personality.Node.boot(self)
  File "/home/crossbario/crossbar/crossbar/node/node.py", line 611, in boot_from_config
    yield d
autobahn.wamp.exception.ApplicationError: ApplicationError(error=<crossbar.error.cannot_start>, args=['Failed to start native worker: A process has ended with a probable error condition: process ended with exit code 1.', [{'log_io': '  File "<frozen importlib._bootstrap_external>", line 940, in exec_module', 'log_time': 1683545790.8517015}, {'log_io': '  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed', 'log_time': 1683545790.8517118}, {'log_io': '  File "/home/crossbario/crossbar/crossbar/personality.py", line 20, in <module>', 'log_time': 1683545790.8517225}, {'log_io': '    from crossbar.worker.router import RouterController', 'log_time': 1683545790.851751}, {'log_io': '  File "/home/crossbario/crossbar/crossbar/worker/router.py", line 25, in <module>', 'log_time': 1683545790.8517697}, {'log_io': '    from crossbar.worker.transport import TransportController, RouterTransport', 'log_time': 1683545790.851798}, {'log_io': '  File "/home/crossbario/crossbar/crossbar/worker/transport.py", line 33, in <module>', 'log_time': 1683545790.8518152}, {'log_io': '    twisted.web.server.version = "Crossbar/{}".format(crossbar.__version__)', 'log_time': 1683545790.8518436}, {'log_io': '                                                      ^^^^^^^^^^^^^^^^^^^^', 'log_time': 1683545790.8519123}, {'log_io': "AttributeError: module 'crossbar' has no attribute '__version__'", 'log_time': 1683545790.8519297}]], kwargs={}, enc_algo=None, callee=None, callee_authid=None, callee_authrole=None, forward_for=None)
crossbario@debian:~$ crossbar --version

    :::::::::::::::::                                                                                                                            
          :::::          _____                 __              _                                                                                 
    :::::   :   :::::   / ___/______  ___ ___ / /  ___ _____  (_)__                                                                              
    :::::::   :::::::  / /__/ __/ _ \(_-<(_-</ _ \/ _ `/ __/ / / _ \                                                                             
    :::::   :   :::::  \___/_/  \___/___/___/_.__/\_,_/_/ (_)_/\___/                                                                             
          :::::                                                                                                                                  
    :::::::::::::::::   Crossbar.io v23.1.2 [19000101-0000000]                                                                                   

    Copyright (c) 2013-2023 Crossbar.io Technologies GmbH. Licensed under EUPLv1.2.                                                              

Type "/home/crossbario/broker/bin/crossbar --help" to get help, or "/home/crossbario/broker/bin/crossbar <command> --help" to get help on a specific command.
Type "/home/crossbario/broker/bin/crossbar legal" to read legal notices, terms of use and license and privacy information.
Type "/home/crossbario/broker/bin/crossbar version" to print detailed version information.
janrinze commented 1 year ago

For now I won't be building from github. Got a work-around for the PIP installed 23.1.2.version..