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

Initialization error with Telemetry Add-on #9

Closed
2 tasks done
JohnOCFII opened this issue Mar 3, 2025 · 8 comments
Closed
2 tasks done

Initialization error with Telemetry Add-on #9

JohnOCFII opened this issue Mar 3, 2025 · 8 comments

Comments

@JohnOCFII
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

While my initial installation of the Telemetry add-on didn't report any errors messages, the builds (including self-builds) for the last week or so are reporting the following:

12:22:29  PostHog initializing. FreeCAD launch metrics are being sent.
12:22:29  Telemetry Addon: Sending FreeCAD version data to Posthog
12:22:29  Telemetry Addon: Sending FreeCAD system info to Posthog
12:22:29  Telemetry Addon: Sending FreeCAD addon info to Posthog
12:22:29  Telemetry Addon: Sending FreeCAD preferences info to Posthog
12:22:29  During initialization the error "argument 2 must be str, not int" occurred in /Users/osh/Library/Application Support/FreeCAD/Mod/FreeCAD-Telemetry/./InitGui.py
12:22:29  Please look into the log file for further information

So - it appears to be working -- but then I receive the error (red) message in the Report Window. This is on macOS.

Full version info

OS: macOS Sequoia (15.3)
Architecture: arm64
Version: 1.1.0dev.40504 (Git) Conda
Build type: Release
Branch: main
Hash: 855ad6c70904f911b2ce7114dd1a5bc24da98bd1
Python 3.13.0, Qt 6.7.3, Coin 4.0.3, Vtk 9.3.1, OCC 7.8.1
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: OpenLight.qss/OpenLight/
Logical/physical DPI: 72/127.5
Installed mods: 
  * FreeCAD-Telemetry 1.0.0
  * OpenTheme 2024.9.1
  * fasteners 0.5.37

Subproject(s) affected?

Addon Manager

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maxwxyz
Copy link
Collaborator

maxwxyz commented Mar 3, 2025

@chennes is this a FreeCAD issue or a telemetry add-on issue?

@maxwxyz
Copy link
Collaborator

maxwxyz commented Mar 3, 2025

Did you install the dependencies manually? I got an error on install:
#8

@maxwxyz
Copy link
Collaborator

maxwxyz commented Mar 3, 2025

Can confirm

Image

OS: Windows 11 build 26100
Architecture: x86_64
Version: 1.1.0dev.40444 (Git) Conda
Build type: Release
Branch: main
Hash: 089605bb4db98668661bf56db3f5f5bb4f7f0d87
Python 3.11.11, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, IfcOpenShell 0.0.0, OCC 7.8.1
Locale: German/Germany (de_DE)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion
Logical/physical DPI: 96/108.888
Installed mods: 
  * Cables 0.1.3
  * CfdOF 1.29.8
  * CurvedShapes 1.0.13
  * Curves 0.6.58
  * dodo 1.0.1
  * fasteners 0.5.37
  * freecad.gears 1.3.0
  * Manipulator 1.5.7
  * OpenTheme 2024.9.1
  * OpticsWorkbench 1.1.2
  * parts_library
  * Rocket 4.1.1
  * sheetmetal 0.7.21
  * Silk 0.1.5
  * Telemetry 1.0.0

@JohnOCFII
Copy link
Author

Did you install the dependencies manually? I got an error on install:
FreeCAD/FreeCAD-Telemetry#8

I think something may have changed in the installation process. I first installed the Telemetry add-on when Chris announced it in Discord. At the time, it showed it had a dependency, and offered (and, I thought, succeeded) in installing it.

@chennes
Copy link
Member

chennes commented Mar 3, 2025

Posthog is installed just fine for you, @JohnOCFII, your real bug is the 12:22:29 During initialization the error "argument 2 must be str, not int" occurred in /Users/osh/Library/Application Support/FreeCAD/Mod/FreeCAD-Telemetry/./InitGui.py error.

@chennes chennes transferred this issue from FreeCAD/FreeCAD Mar 3, 2025
@chennes
Copy link
Member

chennes commented Mar 3, 2025

Here's the full error:

15:26:00  Init:      Initializing /Users/chennes/Library/Application Support/FreeCAD/Mod/Telemetry/./... failed
15:26:00  ----------------------------------------------------------------------------------------------------
15:26:00  Traceback (most recent call last):
  File "<string>", line 142, in RunInitGuiPy
  File "/Users/chennes/Library/Application Support/FreeCAD/Mod/Telemetry/./InitGui.py", line 115, in <module>
    setup()
    ~~~~~^^
  File "/Users/chennes/Library/Application Support/FreeCAD/Mod/Telemetry/./InitGui.py", line 91, in setup
    setup_posthog()
    ~~~~~~~~~~~~~^^
  File "/Users/chennes/Library/Application Support/FreeCAD/Mod/Telemetry/./InitGui.py", line 57, in setup_posthog
    posthog_launch()
    ~~~~~~~~~~~~~~^^
  File "/Users/chennes/Library/Application Support/FreeCAD/Mod/Telemetry/./PosthogFC.py", line 90, in posthog_launch
    posthog_preferences()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/Users/chennes/Library/Application Support/FreeCAD/Mod/Telemetry/./PosthogFC.py", line 278, in posthog_preferences
    "navigation_orbit_style": TrackedPreference.string(
                              ~~~~~~~~~~~~~~~~~~~~~~~~^
        path="BaseApp/Preferences/View/OrbitStyle",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        default=1,
        ^^^^^^^^^^
    ),
    ^
  File "/Users/chennes/Library/Application Support/FreeCAD/Mod/Telemetry/./PosthogFC.py", line 152, in string
    return get_preference(path=path, type="string", default=default, **kwargs)
  File "/Users/chennes/Library/Application Support/FreeCAD/Mod/Telemetry/./PosthogFC.py", line 146, in get_preference
    return transform(getter(name, default))
                     ~~~~~~^^^^^^^^^^^^^^^
TypeError: argument 2 must be str, not int

@chennes
Copy link
Member

chennes commented Mar 3, 2025

OK, this should be fixed by 3d50b69

@chennes chennes closed this as completed Mar 3, 2025
@JohnOCFII
Copy link
Author

OK, this should be fixed by 3d50b69

Telemetry Addon updated and the error message has gone away! Thanks!

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

3 participants