Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to add data files in nuitka
Forum Updated to NodeBB v4.3 + New Features

How to add data files in nuitka

Scheduled Pinned Locked Moved Unsolved Qt for Python
5 Posts 3 Posters 771 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mahdi_2020
    wrote on last edited by
    #1

    I write this commands in terminal:

    python -m nuitka --onefile --windows-console-mode=disable \
    --follow-imports --enable-plugin=PySide6 \
    --include-module=sys --include-module=cv2 \
    --include-module=datetime --include-module=send2trash \
    --include-module=time --include-module=os \
    --include-module=numpy --include-module=main \
    --include-data-files="F:/QML/gallery/gallery.qml=gallery.qml" \
    --include-data-files="F:/QML/gallery/pictures=./pictures/" \
    --output-filename=came.exe \
    main.py
    
    

    and encounter this error:
    File "C:\Users\ym\AppData\Local\Programs\Python\Python312\Lib\site-packages\nuitka\MainControl.py", line 999, in _main
    main_module = _createMainModule()
    ^^^^^^^^^^^^^^^^^^^
    File "C:\Users\ym\AppData\Local\Programs\Python\Python312\Lib\site-packages\nuitka\MainControl.py", line 244, in _createMainModule
    Recursion.checkPluginSinglePath(
    File "C:\Users\ym\AppData\Local\Programs\Python\Python312\Lib\site-packages\nuitka\importing\Recursion.py", line 371, in checkPluginSinglePath
    plugin_filename = os.path.abspath(plugin_filename)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\ym\AppData\Local\Programs\Python\Python312\Lib\ntpath.py", line 591, in abspath
    return _getfullpathname(normpath(path))
    ^^^^^^^^^^^^^^
    TypeError: _path_normpath: path should be string, bytes or os.PathLike, not NoneType

    How do I solve this error?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      friedemannkleint
      wrote on last edited by
      #2

      Which PySide6 version is this - 6.8.1?

      M 1 Reply Last reply
      0
      • S Offline
        S Offline
        Shyamnath
        wrote on last edited by
        #3

        can you maybe try using 'pyside6-deploy'? It uses Nuitka internally and takes care of adding the data files.

        M 1 Reply Last reply
        1
        • F friedemannkleint

          Which PySide6 version is this - 6.8.1?

          M Offline
          M Offline
          Mahdi_2020
          wrote on last edited by Mahdi_2020
          #4

          @friedemannkleint yes 6.8.1

          1 Reply Last reply
          0
          • S Shyamnath

            can you maybe try using 'pyside6-deploy'? It uses Nuitka internally and takes care of adding the data files.

            M Offline
            M Offline
            Mahdi_2020
            wrote on last edited by Mahdi_2020
            #5

            @Shyamnath How do I add project data files (images and QML files) to the pysidedeploy.spec file so that the generated executable file can be run anywhere?Because my data files are not being added.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved