"Module 'radakan.exe' couldn't be recognized."

I’d like to make a standalone win32 build using my p3d file that doesn’t require a connection to run.

First I created a p3d file:

packp3d -o built/radakan.p3d -p C:\Panda3D-1.7.0\python\Lib -m radakan.py -d radakan -r morepy -r deps,,http://localhost -n ogg

I got this output:

I can run the ‘radakan.p3d’ file using ‘panda3d’, and it works as expected.

Then I make a standalone .exe file:

rd /s /q built\run
md built\run

pdeploy -c -s -n radakan -N "Radakan" -v 0.1.0 -A "The Radakan team" -o built/run built/radakan.p3d standalone

Which produces the output:

But when I launch the ‘radakan.exe’ file, I get this output:

And then then it doesn’t do anything anymore.
I’ve searched though the Panda3D-1.7.0 code, but I couldn’t find any occurrence of “couldn’t be recognized”.

Here’s the log/p3core.log file:

Does your .p3d file itself run, if you run it with panda3d.exe?

Also, feel free to email your p3d file so that I can take a look at it.

Yes, I can:

That give this output:

204 subfiles:
         163   18%   Mar 05 15:18 client/__init__.pyo
      448533         Feb 24 15:53 client/art/gui/background_top_mh.png
         379         Feb 24 15:53 client/art/icons/arrow_down.png     
         372         Feb 24 15:53 client/art/icons/arrow_up.png       
         733         Feb 24 15:53 client/art/icons/basket_put.png     
         738         Feb 24 15:53 client/art/icons/basket_remove.png  
         413         Feb 24 15:53 client/art/icons/comment.png        
         633         Feb 24 15:53 client/art/icons/cup.png            
         750         Feb 24 15:53 client/art/icons/eye.png            
         634         Feb 24 15:53 client/art/icons/lightning.png      
         842         Feb 24 15:53 client/art/icons/map_go.png         
         793         Feb 24 15:53 client/art/icons/user_go.png        
       37922   18%   Mar 05 15:18 client/art/models/bowl_test_02.bam  
       10338   44%   Mar 05 15:19 client/art/models/clawhammer.bam    
       61252   55%   Mar 05 15:19 client/art/models/environment.bam   
       58101   27%   Mar 05 15:19 client/art/models/fence_01.bam      
        7608   31%   Mar 05 15:19 client/art/models/hatchet.bam       
        7978   38%   Mar 05 15:19 client/art/models/heavyaxe.bam      
        8808   37%   Mar 05 15:19 client/art/models/hoe.bam           
        7566   36%   Mar 05 15:19 client/art/models/kama.bam          
       14640   42%   Mar 05 15:19 client/art/models/pickaxe.bam       
       11432   36%   Mar 05 15:19 client/art/models/pitchfork.bam     
       14416   31%   Mar 05 15:19 client/art/models/scythe.bam        
       10430   35%   Mar 05 15:19 client/art/models/shovel.bam        
       12404   30%   Mar 05 15:19 client/art/models/sickle.bam        
       11812   46%   Mar 05 15:19 client/art/models/sledgehammer.bam  
      427078         Feb 24 15:52 client/art/models/textures/bowl_01_d.png
      125471         Feb 24 15:52 client/art/models/textures/bowl_01_n.png
      142313         Feb 24 15:52 client/art/models/textures/dirt.png     
       65272         Feb 24 15:52 client/art/models/textures/envir-bamboo.png
        1523         Feb 24 15:52 client/art/models/textures/envir-cylinder.png
       14642         Feb 24 15:52 client/art/models/textures/envir-groundcover1.
png                                                                             
       48114         Feb 24 15:52 client/art/models/textures/envir-mountain1.png

      106434         Feb 24 15:52 client/art/models/textures/envir-mountain2.png

      133994         Feb 24 15:52 client/art/models/textures/envir-reeds.png
        6339         Feb 24 15:52 client/art/models/textures/envir-rock1.jpg
        7346         Feb 24 15:52 client/art/models/textures/envir-rock2.jpg
       84383         Feb 24 15:52 client/art/models/textures/envir-tree1.png
       65496         Feb 24 15:52 client/art/models/textures/envir-tree2.png
        6816         Feb 24 15:52 client/art/models/textures/envir-treetrunk.jpg

      876111         Feb 24 15:52 client/art/models/textures/fence_01_d.png
      895238         Feb 24 15:52 client/art/models/textures/fence_01_n.png
      349323         Feb 24 15:52 client/art/models/textures/gnarly_tool.png
     1292375         Feb 24 15:52 client/art/models/textures/xemna_base_01_d.png

     1334330         Feb 24 15:52 client/art/models/textures/xemna_base_01_g.png

     1015412         Feb 24 15:52 client/art/models/textures/xemna_base_01_n.png

      149242   23%   Mar 05 15:19 client/art/models/xemna_base_01.bam
      849362         Feb 24 15:50 client/art/music/as_the_light_comes_in.ogg
     2406461         Feb 24 15:50 client/art/music/boss_theme.ogg           
     2150014         Feb 24 15:50 client/art/music/cave_ambience.ogg        
     5482562         Feb 24 15:50 client/art/music/del_erad.ogg             
     5930060         Feb 24 15:50 client/art/music/del_erad_echoes.ogg      
      214684         Feb 24 15:50 client/art/music/dramatic_event_2.ogg     
     2227616         Feb 24 15:50 client/art/music/dungeon_theme.ogg        
      483239         Feb 24 15:50 client/art/music/fanfare_2.ogg            
      297100         Feb 24 15:50 client/art/music/fanfare_3.ogg            
      152560         Feb 24 15:50 client/art/music/fanfare_4.ogg            
     2474330         Feb 24 15:50 client/art/music/inferno.ogg              
     3826630         Feb 24 15:50 client/art/music/maria's_theme.ogg        
     4741804         Feb 24 15:50 client/art/music/misc_theme_1.ogg         
     1752940         Feb 24 15:50 client/art/music/misc_theme_2.ogg         
     2739807         Feb 24 15:50 client/art/music/misc_theme_4.ogg         
     3503195         Feb 24 15:50 client/art/music/miscmenu.ogg             
     2451157         Feb 24 15:50 client/art/music/moldan_chase.ogg         
      134609         Feb 24 15:50 client/art/music/moldan_chase_over_failure.ogg

       90974         Feb 24 15:50 client/art/music/moldan_chase_over_success.ogg

     3419825         Feb 24 15:50 client/art/music/old_moltara_underwater_ruins.
ogg                                                                             
     2845582         Feb 24 15:50 client/art/music/overworld_theme.ogg          
      450456         Feb 24 15:50 client/art/music/radakan_game_lost.ogg        
     1930849         Feb 24 15:50 client/art/music/safe_room_theme.ogg          
     2320594         Feb 24 15:50 client/art/music/town_theme.ogg               
     8330944         Feb 24 15:50 client/art/music/tree_creation.ogg            
     5007954         Feb 24 15:50 client/art/music/vol_caves.ogg                
         774   52%   Mar 05 15:18 client/client_.pyo                            
         168   17%   Mar 05 15:18 client/core/__init__.pyo                      
         176   16%   Mar 05 15:18 client/core/actions/__init__.pyo              
        1290   54%   Mar 05 15:18 client/core/actions/action.pyo                
        1998   61%   Mar 05 15:18 client/core/actions/approach.pyo              
        3242   63%   Mar 05 15:18 client/core/actions/consume.pyo               
        2979   64%   Mar 05 15:18 client/core/actions/damage.pyo                
        1991   58%   Mar 05 15:18 client/core/actions/destroy.pyo               
        2443   63%   Mar 05 15:18 client/core/actions/displace.pyo              
        1823   58%   Mar 05 15:18 client/core/actions/drop.pyo                  
        2902   65%   Mar 05 15:18 client/core/actions/examine.pyo               
        2085   57%   Mar 05 15:18 client/core/actions/kill.pyo                  
        3447   65%   Mar 05 15:18 client/core/actions/offer.pyo                 
        3301   65%   Mar 05 15:18 client/core/actions/recontain.pyo             
        3600   63%   Mar 05 15:18 client/core/actions/rotate.pyo                
        4210   70%   Mar 05 15:18 client/core/actions/speak.pyo                 
        1750   60%   Mar 05 15:18 client/core/actions/take.pyo                  
        1143   56%   Mar 05 15:18 client/core/actions/turn_around.pyo           
        1911   59%   Mar 05 15:18 client/core/actions/walk.pyo                  
         178   16%   Mar 05 15:18 client/core/behaviors/__init__.pyo            
        9268   66%   Mar 05 15:18 client/core/behaviors/behavior.pyo            
        2011   61%   Mar 05 15:18 client/core/behaviors/behaviors.pyo           
        4116   67%   Mar 05 15:18 client/core/behaviors/player_behavior.pyo     
        2160   58%   Mar 05 15:18 client/core/configuration.pyo                 
         175   18%   Mar 05 15:18 client/core/events/__init__.pyo               
        2092   63%   Mar 05 15:18 client/core/events/condition_change.pyo       
        1735   65%   Mar 05 15:18 client/core/events/construction.pyo           
        2290   71%   Mar 05 15:18 client/core/events/death.pyo                  
        2101   67%   Mar 05 15:18 client/core/events/destruction.pyo            
        1786   65%   Mar 05 15:18 client/core/events/displacement.pyo           
        1001   48%   Mar 05 15:18 client/core/events/event.pyo                  
         494   46%   Mar 05 15:18 client/core/events/in_game_event.pyo          
         542   47%   Mar 05 15:18 client/core/events/player_behavior_action_chan
ge.pyo                                                                          
        1071   61%   Mar 05 15:18 client/core/events/player_behavior_perception.
pyo                                                                             
         542   47%   Mar 05 15:18 client/core/events/player_behavior_target_chan
ge.pyo                                                                          
         530   47%   Mar 05 15:18 client/core/events/player_character_creation.p
yo                                                                              
        1662   65%   Mar 05 15:18 client/core/events/proceeding.pyo             
        1606   63%   Mar 05 15:18 client/core/events/recontainment.pyo          
        1764   64%   Mar 05 15:18 client/core/events/rotation.pyo               
         181   18%   Mar 05 15:18 client/core/events/transformation.pyo         
        1061   58%   Mar 05 15:18 client/core/events/world_update_exception.pyo 
         247   26%   Mar 05 15:18 client/core/genders.pyo                       
         174   17%   Mar 05 15:18 client/core/items/__init__.pyo                
        4176   63%   Mar 05 15:18 client/core/items/character.pyo               
        5261   68%   Mar 05 15:18 client/core/items/container.pyo               
         452   47%   Mar 05 15:18 client/core/items/container_exception.pyo     
        2261   64%   Mar 05 15:18 client/core/items/humanoid.pyo                
        5645   69%   Mar 05 15:18 client/core/items/item.pyo                    
        2249   62%   Mar 05 15:18 client/core/items/world.pyo                   
        5162   64%   Mar 05 15:18 client/core/model.pyo                         
        2044   71%   Mar 05 15:18 client/core/model_blueprint.pyo               
        1520   56%   Mar 05 15:18 client/core/observatory.pyo                   
        1337   66%   Mar 05 15:18 client/core/race.pyo                          
        1156   40%   Mar 05 15:18 client/core/races.pyo                         
         175   17%   Mar 05 15:18 client/core/skills/__init__.pyo               
        5254   72%   Mar 05 15:18 client/core/skills/character_creation_skillset
.pyo                                                                            
         862   48%   Mar 05 15:18 client/core/skills/skill.pyo                  
        1344   67%   Mar 05 15:18 client/core/skills/skill_group.pyo            
        1991   68%   Mar 05 15:18 client/core/skills/skill_level.pyo            
        4090   58%   Mar 05 15:18 client/core/skills/skills.pyo                 
        3915   69%   Mar 05 15:18 client/core/vector3.pyo                       
         168   17%   Mar 05 15:18 client/data/__init__.pyo                      
         311   32%   Mar 05 15:18 client/data/flags.pyo                         
         178   17%   Mar 05 15:18 client/data/reactions/__init__.pyo            
        5102   68%   Mar 05 15:18 client/data/reactions/feargus_reactions.pyo   
        8381   77%   Mar 05 15:18 client/data/reactions/humanoid_reactions.pyo  
        3995   65%   Mar 05 15:18 client/data/reactions/kamdaz_reactions.pyo    
        5764   73%   Mar 05 15:18 client/data/reactions/player_character_reactio
ns.pyo                                                                          
         438   34%   Mar 05 15:18 client/data/topics.pyo                        
        7972   63%   Mar 05 15:18 client/data/world_data.pyo                    
         178   18%   Mar 05 15:18 client/user_interface/__init__.pyo            
        2009   55%   Mar 05 15:18 client/user_interface/background.pyo          
        5314   55%   Mar 05 15:18 client/user_interface/camera.pyo              
       10668   68%   Mar 05 15:18 client/user_interface/character_creation_frame
.pyo                                                                            
        4672   61%   Mar 05 15:18 client/user_interface/container_information_fr
ame.pyo                                                                         
       13473   62%   Mar 05 15:18 client/user_interface/head_up_display.pyo     
        1179   58%   Mar 05 15:18 client/user_interface/inventory_frame.pyo     
        2702   60%   Mar 05 15:18 client/user_interface/item_information_frame.p
yo                                                                              
        9276   71%   Mar 05 15:18 client/user_interface/journey_handler.pyo     
        1642   50%   Mar 05 15:18 client/user_interface/music.pyo               
       10018   69%   Mar 05 15:18 client/user_interface/panda_window.pyo        
         186   19%   Mar 05 15:18 client/user_interface/screens/__init__.pyo    
        1863   58%   Mar 05 15:18 client/user_interface/screens/about.pyo       
        2722   62%   Mar 05 15:18 client/user_interface/screens/configuration_sc
reen.pyo                                                                        
        2823   50%   Mar 05 15:18 client/user_interface/screens/credits.pyo     
        2067   54%   Mar 05 15:18 client/user_interface/screens/menu.pyo        
        3254   56%   Mar 05 15:18 client/user_interface/statistics_frame.pyo    
         186   18%   Mar 05 15:18 client/user_interface/widgets/__init__.pyo    
        1989   55%   Mar 05 15:18 client/user_interface/widgets/button.pyo      
        1906   48%   Mar 05 15:18 client/user_interface/widgets/entry.pyo       
        3009   58%   Mar 05 15:18 client/user_interface/widgets/frame.pyo       
         953   49%   Mar 05 15:18 client/user_interface/widgets/label.pyo       
        1075   52%   Mar 05 15:18 client/user_interface/widgets/popup_frame.pyo 
         191   18%   Mar 05 15:18 client/user_interface/widgets/scrolled_list.py
o                                                                               
        1838   49%   Mar 05 15:18 client/user_interface/widgets/text_frame.pyo  
          93   30%   Mar 05 15:18 common/__init__.pyo                           
         163   18%   Mar 05 15:18 common/__init__/__init__.pyo                  
         104   27%   Mar 05 15:18 common/decorators/__init__.pyo                
         174   17%   Mar 05 15:18 common/decorators/__init__/__init__.pyo       
        1352   57%   Mar 05 15:18 common/decorators/cache.pyo                   
         877   46%   Mar 05 15:18 common/decorators/halt_on_exception.pyo       
        1839   61%   Mar 05 15:18 common/frozendict.pyo                         
        1181   42%   Mar 05 15:18 common/get_call_string.pyo                    
        2836   60%   Mar 05 15:18 common/log.pyo                                
         391   43%   Mar 05 15:18 common/percentage.pyo                         
         763   45%   Mar 05 15:18 common/print_exception_details.pyo            
        5971   60%   Mar 05 15:18 common/python_2_5_workarounds.pyo             
        1682   69%   Feb 24 15:53 licenses.txt                                  
          94   30%   Mar 05 15:18 logging/__init__.pyo                          
       24846   64%   Mar 05 15:18 logging/handlers.pyo                          
     4779292   99%   Mar 02 19:04 logs/radakan.client.txt                       
     4779285   99%   Mar 02 19:04 logs/radakan.txt                              
         413         Mar 05 15:19 p3d_info.xml                                  
        1850   47%   Mar 05 15:18 radakan.pyo                                   
         444   37%   Feb 24 15:53 radakan_license.txt                           
          76    0%   Feb 24 15:53 readme.txt                                    
         162   17%   Mar 05 15:18 tools/__init__.pyo                            
         171   16%   Mar 05 15:18 tools/analyzer/__init__.pyo                   
        3444   48%   Mar 05 15:18 tools/analyzer/analyzer.pyo                   
         173   19%   Mar 05 15:18 tools/documentor/__init__.pyo                 
        2497   50%   Mar 05 15:18 tools/documentor/documentor.pyo               
         170   17%   Mar 05 15:18 tools/reactio/__init__.pyo                    
       13131   66%   Mar 05 15:18 tools/reactio/reactio.pyo                     
        5094   59%   Mar 05 15:18 tools/reactio/tree.pyo                        
         166   17%   Mar 05 15:18 tools/rwe/__init__.pyo                        
        1424   51%   Mar 05 15:18 tools/rwe/editor.pyo                          
       16736   67%   Mar 05 15:18 tools/rwe/rwe.pyo                             
        2609   53%   Mar 05 15:18 tools/rwe/rwe3d.pyo                           
         165   17%   Mar 05 15:18 tools/rwe/world.pyo                           
         169   17%   Mar 05 15:18 tools/tester/__init__.pyo                     
        1541   48%   Mar 05 15:18 tools/tester/tester.pyo                       
Last modification Mar 05 15:19

Hm… could you email your p3d file so that I can take a look at it?

See http://users.radakan.org/radakan.p3d (71 MB).

Edit:
rdb told me that pdeploy only can use the -s option when making an installer.
So now I’m doing:

pdeploy -c -s -n radakan -N "Radakan" -v 0.1.0 -A "The Radakan team" -o built\run built\radakan.p3d installer

This command gives an error:

Might my other issue be related?

Probably not. I don’t have time to investigate it right now though - I’m swamped with other stuff. I’ll try to make some time next week.

I’ve tried to make an installer with pdeploy for Roaming-Ralph. It resulted in the same problem.

Here’s the p3d file (5.4 MB).

I’ve also tried to make a build on my linux box. I could run that p3d file fine, but I got the same error when making an installer with pdeploy.

Kind bump.

This problem occurs when the .p3d has extra required packages, like p3fmod or morepy. To work around this, I modified PackageInfo.py __readDescFile (around line 332) from this:

        while xrequires:
            packageName = xrequires.Attribute('name')
            version = xrequires.Attribute('version')
            hostUrl = xrequires.Attribute('host')
            if packageName and hostUrl:
                host = self.host.appRunner.getHostWithAlt(hostUrl)
                self.requires.append((packageName, version, host))
            xrequires = xrequires.NextSiblingElement('requires')

To this:

        while xrequires:
            packageName = xrequires.Attribute('name')
            version = xrequires.Attribute('version')
            hostUrl = xrequires.Attribute('host')
            if packageName and hostUrl:
                self.requires.append((packageName, version, self.host))
            xrequires = xrequires.NextSiblingElement('requires')

This assumes that the required packages will be downloaded from the same host as the p3d core packages, which is a safe assumption in my case.

For this to work, you have to grab the latest source code and run pdeploy.py directly (rather than using the pdeploy.p3d or pdeploy.exe).

A better solution would be to ensure that host.appRunner is properly assigned. This could be done when the host is created in DeploymentTools.py in installPackagesInto.

Another problem I ran into was that on Windows, the path to makensis.exe may contain spaces, which causes a “‘c:\Program’ is not recognized as an internal or external command, operable program or batch file.” error. So there should probably be some quotes around the command in DeploymentTools.py buildNSIS, like so:

        options = ["V2"]
        cmd = "\"" + makensis + "\""
        for o in options:
            if sys.platform.startswith("win"):
                cmd += " /" + o
            else:
                cmd += " -" + o
        cmd += " " + nsifile.toOsSpecific()
        print "calling ", cmd
        os.system(cmd)

Wow, thanks so much for looking into this! This saves me a lot of effort, especially as I’m quite busy with PyWeek right now.

Thanks again!

OK, I checked in your fix for the issue with spaces in the path.

As for the other issue - I’m not 100% sure why it’s requiring an appRunner, and I’m a bit afraid to pass base.appRunner to the HostInfo constructor because it may then use information from the appRunner’s host which may or may not be the same as the p3d file’s host.

drwr, could you perhaps shine some light here, why PackageInfo is relying on the HostInfo having an appRunner?

It’s just using the AppRunner as a mapping of url -> HostInfo objects. It needs this to store an appropriate HostInfo for the requested host URL.

I think it should be safe to pass base.appRunner to the HostInfo constructor.

David

Thanks. I just checked in a fix - I just hope I didn’t break anything.

I have yet to look into the original problem, the one about the module not recognised.

Thanks so much for looking into this issue. And, more generally, thanks for your contributions to this great game engine!

This results in a “NameError: global name ‘base’ is not defined” for me, using Panda3D-1.7.0.

Try “from direct.showbase.AppRunnerGlobal import appRunner” instead.

David

‘appRunner’ is ‘None’.