suurjaak / Skyperious

Skype chat history tool
Other
350 stars 36 forks source link

AttributeError: 'Namespace' object has no attribute 'FILE' #111

Closed b-mc closed 2 years ago

b-mc commented 2 years ago

Hi,

I'm experiencing the following on two Ubuntu 22 machines. Skyperious isn't starting the gui at all.

$ skyperious --verbose 
Traceback (most recent call last):
  File "/home/bmc/.local/bin/skyperious", line 8, in <module>
    sys.exit(run())
  File "/home/bmc/.local/lib/python3.10/site-packages/skyperious/main.py", line 916, in run
    if arguments.FILE: # Expand wildcards to actual filenames
AttributeError: 'Namespace' object has no attribute 'FILE'
$ pip3 list | grep skyperious
skyperious             5.2
$ python3 -VV
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0]
$ lsb_release -c
Codename:       jammy
suurjaak commented 2 years ago

Confirmed.

There are a host of other issues on Ubuntu 22 as well, will be fixed in the upcoming release.

Out of curiosity, can you also give the result of

python3 -c "import wx; print(wx.version())"
b-mc commented 2 years ago

Sure:

$ python3 -c "import wx; print(wx.version())"
4.1.1 gtk3 (phoenix) wxWidgets 3.1.5
suurjaak commented 2 years ago

Likewise out of curiosity - how did you get wxPython installed?

b-mc commented 2 years ago

IIRC it was built during the installation of skyperious.

suurjaak commented 2 years ago

Can you try installing this Python wheel: https://erki.lap.ee/stuff/skyperious-5.3.dev8-py2.py3-none-any.whl, and report how it fares? You can just do

pip install https://erki.lap.ee/stuff/skyperious-5.3.dev8-py2.py3-none-any.whl

There were a number of additional problems on Ubuntu 22 that I had to fix, would be good to know if it all works across different setups.

b-mc commented 2 years ago

It's been installed successfully, however this time skyperious --verbose isn't starting too, giving me nothing on stderr. I've tried on both machines.

suurjaak commented 2 years ago

--verbose is only meant for the command-line interface, however it should definitely start up the GUI..

What happens if you try the following commands:

b-mc commented 2 years ago

No gui is starting after these two:

$ skyperious 
$ skyperious gui
$ skyperious --help
usage: skyperious [-h] [--verbose] [-v] [--no-terminal] [--config-file CONFIG_FILE]
                  {export,search,sync,create,merge,diff,gui} ...

Skyperious - Skype chat history tool.

positional arguments:
  {export,search,sync,create,merge,diff,gui}
    export              export Skype databases as HTML, text or spreadsheet
    search              search Skype databases for messages or data
    sync                download new messages from Skype online service
    create              create a new database
    merge               merge two or more Skype databases into a new database
    diff                compare chat history in two Skype databases
    gui                 launch Skyperious graphical program (default option)

options:
  -h, --help            show this help message and exit
  --verbose             print detailed progress messages to stderr
  -v, --version         show program's version number and exit
  --no-terminal         command-line output suitable for non-terminal display, like piping to a file
  --config-file CONFIG_FILE
                        path of configuration file to use
$ skyperious create --username someuser --verbose blank.db
2022-07-14 17:52:03,515 Creating new blank database /home/bmc/blank.db for user 'someuser'.
2022-07-14 17:52:03,938 Inserting account "someuser" into /home/bmc/blank.db.
Created blank database /home/bmc/blank.db for user someuser.
suurjaak commented 2 years ago

Can you try with this: https://erki.lap.ee/stuff/skyperious-5.3.dev9-py2.py3-none-any.whl

It should at least print out the error.

b-mc commented 2 years ago

Sorry, still the same. I've observed that the program icon seems to be popping up shortly in the tray and then disappears.

suurjaak commented 2 years ago

This is getting interesting.. Sorry for this back-and-forth, but can you try with this: https://erki.lap.ee/stuff/skyperious-5.3.dev9_debug-py2.py3-none-any.whl

It should write a log file to /tmp/skyperious.log.

b-mc commented 2 years ago

Here's the content of the log file. The second section was also printed to stdout.

2022-07-18 20:04:25.025 An unexpected error has occurred:

            Traceback (most recent call last):
              File "/home/bmc/.local/lib/python3.10/site-packages/wx/lib/agw/ultimatelistctrl.py", line 12278, in OnSize
                self.DoLayout()
              File "/home/bmc/.local/lib/python3.10/site-packages/wx/lib/agw/ultimatelistctrl.py", line 13657, in DoLayout
                self._mainWin.RecalculatePositions()
              File "/home/bmc/.local/lib/python3.10/site-packages/wx/lib/agw/ultimatelistctrl.py", line 9678, in RecalculatePositions
                self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
            TypeError: _ScrolledWindowBase.SetScrollbars(): argument 3 has unexpected type 'float'

Traceback (most recent call last):
  File "/home/bmc/.local/lib/python3.10/site-packages/skyperious/main.py", line 991, in run
    try: run_gui(arguments.FILE)
  File "/home/bmc/.local/lib/python3.10/site-packages/skyperious/main.py", line 872, in run_gui
    window = gui.MainWindow()
  File "/home/bmc/.local/lib/python3.10/site-packages/skyperious/gui.py", line 155, in __init__
    self.create_page_main(notebook)
  File "/home/bmc/.local/lib/python3.10/site-packages/skyperious/gui.py", line 309, in create_page_main
    list_db.SetColumns(columns)
  File "/home/bmc/.local/lib/python3.10/site-packages/skyperious/lib/controls.py", line 3066, in SetColumns
    self.ClearAll()
  File "/home/bmc/.local/lib/python3.10/site-packages/wx/lib/agw/ultimatelistctrl.py", line 11940, in ClearAll
    self._mainWin.DeleteEverything()
  File "/home/bmc/.local/lib/python3.10/site-packages/wx/lib/agw/ultimatelistctrl.py", line 10053, in DeleteEverything
    self.DeleteAllItems()
  File "/home/bmc/.local/lib/python3.10/site-packages/wx/lib/agw/ultimatelistctrl.py", line 10047, in DeleteAllItems
    self.RecalculatePositions()
  File "/home/bmc/.local/lib/python3.10/site-packages/wx/lib/agw/ultimatelistctrl.py", line 9678, in RecalculatePositions
    self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
TypeError: _ScrolledWindowBase.SetScrollbars(): argument 3 has unexpected type 'float'
suurjaak commented 2 years ago

This installation of wxPython seems amazingly broken.

I'd better try and duplicate your setup locally. As I understand it, you just did pip install skyperious?

b-mc commented 2 years ago

That's correct. Should be easily reproducible, since all attempts were made on two machines.

suurjaak commented 2 years ago

Did you install additional apt packages beforehand, like libgtk-3-dev?

suurjaak commented 2 years ago

Could finally reproduce the problems, and derive a better fix.

Can you try with this: https://erki.lap.ee/stuff/skyperious-5.3.dev15_debug-py2.py3-none-any.whl.

b-mc commented 2 years ago

Did you install additional apt packages beforehand, like libgtk-3-dev?

Yes, apt shows this package as manually installed. This was done over 1 year ago, I have no way of knowing if the installation was needed for this particular use case.

Could finally reproduce the problems, and derive a better fix.

Can you try with this: https://erki.lap.ee/stuff/skyperious-5.3.dev15_debug-py2.py3-none-any.whl.

Working now on both machines, thanks!

suurjaak commented 2 years ago

Excellent. Will keep this issue open until the public release.

One more thing - does the screenshotting work in the feedback window (menu Help -> Send feedback)? I could not test this properly in a virtual machine.

b-mc commented 2 years ago

Yes, it works correctly.

suurjaak commented 2 years ago

Released v5.3 with the fixes.

By the way, Skyperious can now also be installed via Snap.