BEEmod / BEE2.4

Tool to mod Portal 2's Puzzlemaker
282 stars 63 forks source link

pyinstaller failed with "TypeError: expected str, bytes or os.PathLike object, not NoneType" (Linux) #1942

Closed ghost closed 9 months ago

ghost commented 1 year ago

BEE2 Package Version

4.43.0

What operating system are you running on?

Manjaro Linux

Description of the bug

Pyinstaller failed with "TypeError: expected str, bytes or os.PathLike object, not NoneType"

Steps to reproduce

  1. I followed readme.md
  2. After setup run pyinstaller --distpath ../dist/64bit/ --workpath ../build_tmp BEE2.spec

Logs and Reports

sudo pyinstaller --distpath ../dist/64bit/ --workpath ../build_tmp BEE2.spec

203 INFO: PyInstaller: 5.9.0
203 INFO: Python: 3.10.10
205 INFO: Platform: Linux-6.1.22-1-MANJARO-x86_64-with-glibc2.37
206 INFO: UPX is not available.
454 INFO: vcs returned tag 2.4.43.0
455 INFO: tag2version returned version 2.4.43.0
455 INFO: next-version returned version 2.5.0
455 INFO: VCS state is 'distance-dirty'; formatting version
455 INFO: Final version: 2.4.43.0.dev+ff30ff89
Need implementation of utils.check_shift()!
Reading translations from source...
Done!
Updating translations: 
> fr
> pl
> es
> ja
> ru
> zh_cn
Loading FGD database...
Loading database /home/denisredman/git/BEE2.4/hammeraddons/fgd:

...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Done!
Entities without visgroups:
env_steamjet, grenade, tank_destruction, pet_entity, concussiveblast, flashbang_projectile, passtime_logic, misc_dead_hev, passtime_ball, pd_dispenser, camera_satellite, vehicle_viewcontroller, hunter_flechette, skybox_swapper, model_studio, vortex_controller, archer_proxy, hostage_entity, misc_xen_shield, base_boss, hegrenade_projectile, tank_boss, portal_race_checkpoint, zombie_goo_puddle, playtest_manager, material_timer, gibshooter, boss_alpha, monster_generic, molotov_projectile, hightower_teleport_vortex, script_intro, mapobj_cart_dispenser, merasmus_dancer, rd_robot_dispenser, aiscripted_schedule, misc_marionettist, planted_c4_training, misc_xen_healing_pylon, vgui_slideshow_display, vgui_world_text_panel, vgui_text_display, filter_script, filter_multiplayer_kzmod, item_large_box_srounds, item_pickup, item_defuser, item_powerup_crit, item_nugget, item_flare_round, item_armor, item_healthkit_custom, item_powerup_rune, item_sodacan, item_powerup_uber, item_creature_crate, item_box_flare_rounds, hot_potato_socket, hot_potato_spawner, hot_potato, hot_potato_catcher, info_territory_control_encryption, info_timescale_controller, info_territory_control_bank, info_marine_hint, info_survivor_rescue, info_l4d1_survivor_spawn, info_radar_target, info_powerup_spawn, info_survival_crate_spawn, info_armsrace_counterterrorist, info_gamemode, info_teleporter_countdown, info_territory_control_terrorist, info_zombie_spawn, info_goal_infected_chase, info_dlightmap_update, info_particle_target, info_deathmatch_spawn, info_tutorial_start, info_ambient_mob_end, info_director, info_intermission, info_observer_menu, info_armsrace_terrorist, info_player_ping_detector, info_ambient_mob, info_territory_control_hospital, info_placement_helper, info_snipertarget, info_territory_control_surveillance, info_territory_control_barracks, info_ambient_mob_start, info_observer_point, info_item_position, info_remarkable, info_hint, info_zombie_border, info_elevator_floor, info_game_event_proxy, info_passtime_ball_spawn, info_territory_control_counterterrorist, info_npc_spawn_destination, info_camera_link, info_player_logo, info_survivor_position, info_stopallsounds, info_nihilanth_summon, info_player_seeker, team_control_point, team_train_watcher, team_control_point_round, team_round_timer, team_control_point_master, obj_teleporter, obj_sentrygun, obj_dispenser, grenade_helicopter, upgrade_spawn, ai_weaponmodifier, ai_monitor, entity_bird, entity_sign, entity_spawn_point, entity_rocket, entity_croc, entity_saucer, entity_carrier, npc_grenade_bugbait, npc_pit_drone, npc_lost_soul, npc_zassassin, npc_shadow_walker, npc_lav, npc_hover_turret, npc_satchel, npc_sentry_ceiling, npc_sentry_ground, asw_polytest, asw_marines_past_area, asw_env_spark, asw_objective_kill_aliens, asw_broadcast_camera, asw_simple_drone, asw_equip_req, asw_ammo_flamer, asw_sentry_top, asw_shieldbug, asw_sentry_top_icer, asw_tech_marine_req, asw_ammo_rifle, asw_pickup_flashlight, asw_stylincam, asw_sentry_top_machinegun, asw_objective_survive, asw_sentry_top_cannon, asw_jukebox, asw_ranger, asw_pickup_shotgun, asw_weapon_jump_jet, asw_holo_sentry, asw_vehicle_jeep, asw_pickup_vindicator, asw_ammo_pistol, asw_grub, asw_intro_control, asw_pickup_ammo_bag, asw_remote_turret, asw_ammo_drop, asw_marker, asw_ammo_pdw, asw_sentry_top_flamer, asw_objective_triggered, asw_barrel_explosive, asw_alien_goo, asw_ammo_autogun, asw_colonist, asw_ammo_shotgun, asw_parasite_defanged, asw_grub_sac, asw_info_message, asw_objective_destroy_goo, asw_objective_kill_eggs, asw_emitter, asw_menu_flashlight, asw_harvester, asw_weapon_blink, asw_parasite, asw_prop_laserable, asw_pickup_flamer, asw_pickup_welder, asw_pickup_mining_laser, asw_barrel_radioactive, asw_boomer, asw_queen, asw_mortarbug, asw_pickup_chainsaw, asw_order_nearby_aliens, asw_spawn_group, asw_pickup_autogun, asw_debrief_info, asw_objective_escape, asw_pickup_grenades, asw_pickup_pdw, asw_pickup_medkit, asw_ammo_vindicator, asw_pickup_mines, asw_hurt_nearest_marine, asw_client_corpse, asw_bloodhound, asw_egg, asw_info_heal, asw_pickup_pistol, asw_buzzer, asw_pickup_prifle, asw_pickup_sentry, asw_env_explosion, asw_drone_jumper, asw_ammo_mining_laser, asw_pickup_flares, asw_holdout_mode, asw_director_control, asw_pickup_fire_extinguisher, asw_spawner, asw_objective_countdown, asw_pickup_stim, asw_holoscan, asw_drone_uber, asw_holdout_spawner, asw_drone, asw_queen_retreat_spot, asw_pickup_rifle, asw_objective_dummy, assault_rallypoint, assault_assaultpoint, comp_player_input_helper, comp_flicker, hammer_updateignorelist, newxog_global, newxog_settings, test_sidelist, test_traceline, point_nav_blocker, point_glow, point_apc_controller, point_playermoveconstraint, point_event, point_projectile, point_entity_replace, point_camera_ortho, point_broadcastclientcommand, point_powerjump, point_populator_interface, point_territory_control_rules, point_climbtimer, point_push, point_enable_motion_fixup, point_event_proxy, point_gamestats_counter, point_entity_finder, point_give_ammo, point_powerup_stripper, point_nav_attribute_region, point_script_use_target, point_caption_message, point_copy_size, point_damageinfo, point_hurt, point_weaponstrip, point_radiation_source, point_deathfall_camera, point_surroundtest, point_ragdollboogie, point_survey, point_gravity, point_antlion_repellant, point_changelevel, point_advanced_finder, point_prop_use_target, point_bonusmaps_accessor, point_devshot_camera, point_bugbait, point_intermission, point_hiding_spot, logic_relay_kzmod, logic_substring, logic_script_client, logic_checkpoint_link, logic_playerinfo, game_coopmission_manager, game_intro_viewpoint, game_scavenge_progress_display, game_globalvars, game_ragdoll_manager, game_money, game_player_team, game_score, game_forcerespawn, sound_mix_layer, tf_spawner, tf_base_minigame, tf_logic_boss_battle, tf_point_weapon_mimic, tf_pumpkin_bomb, tf_bonus_duck_pickup, tf_robot_destruction_robot_spawn, tf_halloween_gift_pickup, tf_point_nav_interface, tf_glow, tf_logic_multiple_escort, tf_robot_destruction_spawn_group, tf_logic_holiday, tf_teleport_location, tf_zombie_spawner, tf_logic_minigames, tf_target_dummy, tf_logic_arena, tf_logic_robot_destruction, tf_logic_hybrid_ctf_cp, tf_logic_koth, tf_halloween_minigame_falling_platforms, tf_logic_raid, tf_spell_pickup, tf_logic_competitive, tf_logic_cp_timer, tf_logic_player_destruction, tf_template_stun_drone, tf_logic_medieval, tf_ammo_pack, tf_generic_bomb, tf_halloween_minigame, tf_halloween_gift_spawn_location, tf_halloween_pickup, tf_logic_training_mode, tf_logic_on_holiday, tf_logic_mannpower, tf_logic_mann_vs_machine, env_physexplosion, env_firesensor, env_tracer, env_lensflare, env_fumer, env_pinch, env_closecaption, env_break_shooter, env_gon_mortar_area, env_effectscript, env_slomo, env_outtro_stats, env_portal_credits, env_airstrike_indoors, env_particle_performance_monitor, env_physimpact, env_entity_dissolver, env_dispenser, env_fov, env_weaponfire, env_player_blocker, env_xen_pushpad, env_mortar_controller, env_credits, env_steam, env_player_surface_trigger, env_sporeexplosion, env_cascade_light, env_tram_screen, env_dustpuff, env_movieexplosion, env_microphone, env_physics_blocker, env_flare, env_message, env_firesource, env_player_viewfinder, env_airstrike_outdoors, env_starfield, env_funnel, env_beverage, env_entity_igniter, scripted_item_drop, scripted_sentence, scripted_sound, move_keyframed, infra_flowmap_modify, halloween_zapper, halloween_souls_pack, halloween_fortune_teller, func_fish_pool, func_timescale, func_orator, sixense_logic_relay, sixense_logic_playmovie_hint, sixense_info_placement_helper, tanktrain_aitarget, tanktrain_ai, training_prop_dynamic, training_annotation, newLights_settings, newLights_Spawner, newlights_gbuffersettings, prop_charger_base, prop_flare, prop_telescopic_arm, prop_hallucination, prop_wall_breakable, prop_exploding_barrel, prop_fuel_barrel, prop_tsp_button, prop_dynamic_kzmod, prop_physics_psychokinesis, prop_glowing_object, prop_vehicle_drivable_apc, prop_mounted_machine_gun, prop_tic_tac_toe_panel, prop_physics_teleprop, prop_rocket_tripwire, prop_soccer_ball, prop_mirror, prop_stickybomb, prop_health_cabinet, prop_contraption_cube, prop_dropship_container, prop_contraption_cube_button, player_speedmod, player_weaponstrip, player_loadsaved, fog_volume, momentary_door, color_correction_volume, dispenser_touch_trigger, newxog_volume, game_zone_player, info_apc_missile_hint, info_changelevel, trigger_spraylogo, trigger_checkpoint, trigger_legbreak, trigger_player_fall_aim, trigger_playersolidity, trigger_bhop_teleport, trigger_still, trigger_player_movement_attributes, trigger_flare_interval, trigger_add_or_remove_tf_player_attributes, trigger_nocheck, trigger_jumpcontrol, trigger_flare, env_embers, env_bubbles, func_precipitation, func_tanklaser, func_buyzone, func_achievement, func_regenerate, func_fake_worldportal, func_nav_connection_blocker, func_bomb_target, func_tankpulselaser, func_liquidportal, func_placement_clip, func_bulletshield, func_tankairboatgun, func_movelinear, func_tow_mp, func_buildable_button, func_tow, func_rotating, func_tanktrain, func_flag_alert, func_passtime_goalie_zone, func_nogrenades, func_spawn_volume, func_traincontrols, func_nav_attribute_region, func_dustmotes, func_precipitation_blocker, func_water, func_trackchange, func_passtime_goal, func_viscluster, func_capturezone, func_combine_ball_spawner, func_starttimer, func_forcefield, func_tankmortar, func_croc, func_nobuild, func_extinguisher, func_water_analog, func_passtime_no_ball_zone, func_hostage_rescue, func_nav_blocker, func_nav_avoid, func_nav_stairs_toggle, func_fire_extinguisher, func_tank_combine_cannon, func_reflective_glass, func_platrot, func_elevator, func_respawnflag, func_plat, func_tanklogic, func_tfbot_hint, func_commandredirect, func_setcoursenames, func_tankapcrocket, func_respawnroom, func_block_charge, func_stoptimer, func_ragdoll_fader, func_smokevolume, func_nav_prerequisite, func_powerupvolume, func_no_defuse, func_changeclass, func_respawnroomvisualizer, func_friction, func_suggested_build, func_detail_blocker, func_flagdetectionzone, func_dustcloud, func_train, func_playerghostinfected_clip, func_clip_client, func_trackautochange, func_upgradestation, func_nav_prefer, func_50cal, func_nav_avoidance_obstacle, func_subtract, func_tank, func_territory_respawn_area, func_ropecontrol, func_illusionary, func_brush_kzmod, func_camera_target, func_volumetric_fog, func_pushable, func_proprrespawnzone, func_tracktrain, func_null, func_ropetarget, func_guntarget, func_tankphyscannister, func_tankrocket, func_playerinfected_clip, 
Visgroup count: 999/1545 (64.66%) done!
3154 INFO: vcs returned tag 2.4.43.0
3155 INFO: tag2version returned version 2.4.43.0
3155 INFO: next-version returned version 2.5.0
3155 INFO: VCS state is 'distance-dirty'; formatting version
3155 INFO: Final version: 2.4.43.0.dev+ff30ff89
BEE_VERSION='2.4.43.0.dev+ff30ff89'
3155 INFO: Extending PYTHONPATH with paths
['/home/denisredman/git/BEE2.4/src',
 '/home/denisredman/git/BEE2.4/build_tmp/BEE2']
3581 INFO: checking Analysis
3581 INFO: Building Analysis because Analysis-00.toc is non existent
3581 INFO: Initializing module dependency graph...
3583 INFO: Caching module graph hooks...
3592 INFO: Analyzing base_library.zip ...
4642 INFO: Loading module hook 'hook-heapq.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
4744 INFO: Loading module hook 'hook-encodings.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
5378 INFO: Loading module hook 'hook-pickle.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
7749 INFO: Caching module dependency graph...
7885 INFO: running Analysis Analysis-00.toc
7910 INFO: Analyzing /home/denisredman/git/BEE2.4/src/BEE2_launch.pyw
7984 INFO: Loading module hook 'hook-multiprocessing.util.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
8171 INFO: Loading module hook 'hook-xml.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
8490 INFO: Loading module hook 'hook-srctools.py' from '/usr/lib/python3.10/site-packages/srctools/_pyinstaller'...
8842 INFO: Loading module hook 'hook-platform.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
9157 INFO: Loading module hook 'hook-importlib_resources.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
10240 INFO: Loading module hook 'hook-pycparser.py' from '/usr/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
10730 INFO: Processing pre-find module path hook distutils from '/usr/lib/python3.10/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'.
10935 INFO: Loading module hook 'hook-distutils.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
10992 INFO: Loading module hook 'hook-distutils.util.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
11028 INFO: Loading module hook 'hook-sysconfig.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
11333 INFO: Loading module hook 'hook-setuptools.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
12525 INFO: Loading module hook 'hook-packaging.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
13137 INFO: Loading module hook 'hook-jaraco.text.py' from '/usr/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
13460 INFO: Loading module hook 'hook-pkg_resources.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
14233 INFO: Loading module hook 'hook-platformdirs.py' from '/usr/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
16215 INFO: Loading module hook 'hook-cryptography.py' from '/usr/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
17488 INFO: Loading module hook 'hook-bcrypt.py' from '/usr/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
17974 INFO: Loading module hook 'hook-difflib.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
18126 INFO: Loading module hook 'hook-PIL.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
18262 INFO: Loading module hook 'hook-PIL.Image.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
18905 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
19047 INFO: Loading module hook 'hook-idlelib.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
19115 INFO: Loading module hook 'hook-babel.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
19372 INFO: Loading module hook 'hook-pytz.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
19434 INFO: Loading module hook 'hook-zoneinfo.py' from '/usr/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
23787 INFO: Processing pre-safe import module hook gi from '/usr/lib/python3.10/site-packages/PyInstaller/hooks/pre_safe_import_module/hook-gi.py'.
23881 INFO: Loading module hook 'hook-gi.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
23984 INFO: Processing pre-safe import module hook gi.repository.Gst from '/usr/lib/python3.10/site-packages/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.Gst.py'.
23984 INFO: Processing pre-safe import module hook gi.repository.GLib from '/usr/lib/python3.10/site-packages/PyInstaller/hooks/pre_safe_import_module/hook-gi.repository.GLib.py'.
24886 INFO: Analyzing hidden import 'PIL._tkinter_finder'
24887 INFO: Processing module hooks...
24890 WARNING: Hidden import "pkg_resources._vendor.jaraco.functools" not found!
24890 WARNING: Hidden import "pkg_resources._vendor.jaraco.context" not found!
24890 WARNING: Hidden import "pkg_resources._vendor.jaraco.text" not found!
24921 INFO: Loading module hook 'hook-setuptools.msvc.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
25382 WARNING: Hidden import "importlib_resources.trees" not found!
25701 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
25734 INFO: Loading module hook 'hook-gi.repository.GLib.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
25846 WARNING: Unrecognised line of output 'Кэш сгенерирован: ldconfig (GNU libc) stable release version 2.37' from ldconfig
26722 INFO: Loading module hook 'hook-_tkinter.py' from '/usr/lib/python3.10/site-packages/PyInstaller/hooks'...
Traceback (most recent call last):
  File "/usr/bin/pyinstaller", line 8, in <module>
    sys.exit(_console_script_run())
  File "/usr/lib/python3.10/site-packages/PyInstaller/__main__.py", line 194, in _console_script_run
    run()
  File "/usr/lib/python3.10/site-packages/PyInstaller/__main__.py", line 180, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/usr/lib/python3.10/site-packages/PyInstaller/__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/usr/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 979, in main
    build(specfile, distpath, workpath, clean_build)
  File "/usr/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 901, in build
    exec(code, spec_namespace)
  File "BEE2.spec", line 257, in <module>
    bee2_a = Analysis(
  File "/usr/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 414, in __init__
    self.__postinit__()
  File "/usr/lib/python3.10/site-packages/PyInstaller/building/datastruct.py", line 173, in __postinit__
    self.assemble()
  File "/usr/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 583, in assemble
    self.graph.process_post_graph_hooks(self)
  File "/usr/lib/python3.10/site-packages/PyInstaller/depend/analysis.py", line 330, in process_post_graph_hooks
    module_hook.post_graph(analysis)
  File "/usr/lib/python3.10/site-packages/PyInstaller/depend/imphook.py", line 447, in post_graph
    self._process_hook_func(analysis)
  File "/usr/lib/python3.10/site-packages/PyInstaller/depend/imphook.py", line 469, in _process_hook_func
    self._hook_module.hook(hook_api)
  File "/usr/lib/python3.10/site-packages/PyInstaller/hooks/hook-_tkinter.py", line 27, in hook
    hook_api.add_datas(collect_tcl_tk_files(hook_api.__file__))
  File "/usr/lib/python3.10/site-packages/PyInstaller/utils/hooks/tcl_tk.py", line 243, in collect_tcl_tk_files
    tcl_root, tk_root = _find_tcl_tk(tkinter_ext_file)
  File "/usr/lib/python3.10/site-packages/PyInstaller/utils/hooks/tcl_tk.py", line 205, in _find_tcl_tk
    tk_dir = os.path.join(os.path.dirname(tcl_dir), f"tk{tk_version}")
  File "/usr/lib/python3.10/posixpath.py", line 152, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
TeamSpen210 commented 1 year ago

Seems like this occurs if Tcl/Tkinter isn't installed, do you have that?

ghost commented 1 year ago

@TeamSpen210 No, I haven't. After installing TKinter, pyinstaller went fine without errors, the application works. Thanks for help!