Help in image texture on object

FWIW, below are pointers to my first 3D game. It is simple, raw (or absent) visual design, but proof of a concept. The game is not intended for gamers but for students, particularly history and science, though I have thrown in the humanities to test the idea. But it did work out well, and thanks for your help. The idea is to provide a platform for middle-school history projects; the student submits a report consisting of a spreadsheet of events and images and they are rolled into a game that has some learning value. My investigation is to determine if this idea is worth it.

One issue that did come up on the textures is that after I replace the textures 7 times (changed ‘rooms’ exactly 6 times, every time), they seemed to get stuck and not change any more, or sometimes blank walls or wrong aspect ratio. I assumed it was a garbage collection problem. To stop this, eventually I arrived at destroy and replace the wall model, texture surface, and texture every room change. My code is slightly different from your solutions, perhaps that is relevant.

Windows: https://www.ideategames.org/Museum_win.zip
Mac: https://www.ideategames.org/Museum_mac.zip
Linux: https://www.ideategames.org/Museum_linux.gz

I have not really tested the mac or linux versions.

3 Likes

On Linux it crashes at startup because the pandas library can not find the cmath module, perhaps you should explicitly reference it in the include_modules of your setup.py (if you are using the dist tool of Panda3D).

Known pipe types:
  glxGraphicsPipe
(all display modules loaded.)
rebuilding walls
setting wall: 0:4
setting wall: 1:4
setting wall: 2:4
setting wall: 3:4
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
setting stars: 0
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
pandas.compat:97: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
Traceback (most recent call last):
  File "__main__", line 314, in 
  File "__main__", line 112, in __init__
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 986, in _find_and_load_unlocked
  File "importlib._bootstrap", line 680, in _load_unlocked
  File "importlib._bootstrap", line 838, in exec_module
  File "Topics", line 7, in 
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 972, in _find_and_load_unlocked
  File "importlib._bootstrap", line 228, in _call_with_frames_removed
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 972, in _find_and_load_unlocked
  File "importlib._bootstrap", line 228, in _call_with_frames_removed
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 972, in _find_and_load_unlocked
  File "importlib._bootstrap", line 228, in _call_with_frames_removed
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 986, in _find_and_load_unlocked
  File "importlib._bootstrap", line 680, in _load_unlocked
  File "importlib._bootstrap", line 838, in exec_module
  File "pandas", line 179, in 
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 986, in _find_and_load_unlocked
  File "importlib._bootstrap", line 680, in _load_unlocked
  File "importlib._bootstrap", line 838, in exec_module
  File "pandas.testing", line 5, in 
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 986, in _find_and_load_unlocked
  File "importlib._bootstrap", line 680, in _load_unlocked
  File "importlib._bootstrap", line 838, in exec_module
  File "pandas._testing", line 27, in 
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 986, in _find_and_load_unlocked
  File "importlib._bootstrap", line 680, in _load_unlocked
  File "importlib._bootstrap", line 838, in exec_module
  File "pandas._libs.testing", line 1, in 
  File "imp", line 342, in load_dynamic
  File "importlib._bootstrap", line 711, in _load
  File "importlib._bootstrap", line 680, in _load_unlocked
  File "importlib._bootstrap_external", line 1116, in exec_module
  File "importlib._bootstrap", line 228, in _call_with_frames_removed
  File "pandas/_libs/testing.pyx", line 1, in init pandas._libs.testing
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'cmath'

I have on Windows 10 it just doesn’t start.

Thanks. I will have to get those platforms spun up and test. I did the build as helped in another thread. Pandas was a big problem getting it to build.

NOTE: If I try requesting those specifically:
ERROR: No matching distribution found for lzma
ERROR: No matching distribution found for cmath

requirements.txt:
panda3d==1.10.7
numpy
pandas
requests
bcrypt
cryptography
pep517

setup.py
from setuptools import setup

setup(
    name="Mixed Up Museum",
    options = {
        'build_apps': {
            'gui_apps': {'Museum': 'Maze.py'},
            'include_patterns': [
                '**/*.png',
                '**/*.jpg',
                '**/*.egg',
                '**/*.bam',
                '**/*.csv',
                '**/*.ogg',
            ],
            'plugins': [
                'pandagl',
                'p3openal_audio',
            ],
            'include_modules': ['pandas'],
        }
    }
)

cmath isn’t something you can put in requirements.txt, since it’s a module that ships with Python. I suggest putting it in include_modules in setup.py instead. Same with lzma.

I did that with both, and uploaded (to the same link) the linux build with those yesterday, but have not tested it yet. All I have right now is rasberry Pi, and it says the executable is not formatted correctly.

The Windows is a bit more puzzling, the command just returns with no output at all. I will try putting all the source on my windows today.

Update: The game runs without change on Windows. Now building distribution on Windows to see how it works.

Same result – nothing. The executable returns immediately on windows, no error.

Interestingly, though, now building with 1.10.8 on OSX (same warning on Windows now!) I get a new warning: cannot find python3.dll. That sounds like a fatal problem for a windows build.

warning: build_apps: could not find dependency python3.dll (referenced by bcrypt._bcrypt.pyd)

Windows build also has these warnings: _testcapi.pyd, testinternalcapy.pyd

Clearly something wrong in my environment. Were those modules somehow left out of my installation? I am puzzled.

So where do I need to put python3.dll? It is on my Windows machine, but clearly the build is not finding it. Do I need to put a copy somewhere? Putting it in the directory with the .exe file does not make a difference. python39.dll is already there. I am bewildered.

Raspberry Pi is an ARM platform. We don’t provide wheels for ARM processors right now. Although, if there’s interest in this, I could give it a try; it may not be hard to provide them.

You need to set log_filename for the game to run on Windows. As it happens this is also the only way you can get any error messages from the result. Without those error messages from the log we don’t have a clue where to start looking for what might be wrong.

I don’t think you should go looking for python3.dll until you have some definitive proof that its absence is causing problems.

I don’t think you need to worry about the missing _testcapi.pyd either.

Raspberry Pi is not really part of my market, just happens to be the only linux machine I have at the moment. And it might be a while for more testing on Windows, my old windows laptop seems to have given up. I’ll get back when I have more news.

@rdb I have to admit I am confused. I loaded logging and set it all up in the python main program, and running it with python creates the log file, though blank. Building the windows program then and running it does the same exit as before, without creating the log file.

I also checked the system event logs and there were no errors corresponding to the times I ran the program.

Just to be thorough, I set an environment variable called log_filename, but of course no effect.

Sorry to be dumb, but how do I set log_filename so that the Windows program will run?

log_filename is not an environment variable but a parameter in your setup.py file in the build_apps section, e.g. :

        'log_filename': '$USER_APPDATA/MyApp/output.log',
        'log_append': False,

You can have a look at the Asteroids sample in Panda3D repository, there is an example of a simple setup.py that works on all platforms (win, mac, linux).

A program that runs when launched from the source code yet does not work when bundled usually indicates either that you forgot a dependency in your requirements.txt or include_modules or that you are loading resources using the wrong path.

Thank you. I had followed the simpler asteroids setup in the docs, but did not look at the example.

But I have gone the wrong way. Now the OSX build no longer works, gives
ModuleNotFoundError: No module named ‘cmath’

– but at least in the log file. And I have

        'include_modules': ['pandas','cmath','lzma'],

in the setup.py.

The cmath error is caused by this line, recommended by @rdb to include:
import pandas._libs.tslibs.base

If I don’t include that line, I get this error:
ImportError: C extension: No module named ‘pandas._libs.tslibs.base’ not built. If you want to import pandas from the source directory, you may need to run ‘python setup.py build_ext --force’ to build the C extensions first.

(of course I have done the recommended force build)

If I had to guess, my guess would be that no one else uses pandas in their panda3d games and builds distributions with that module? The pandas module seems to be the source of my problems.

I will redesign to no use pandas (solved the problem for OSX, trying others.)

I believe your include_modules is wrong, it’s not a list but a dict :

include_modules: {'*': [ 'pandas', 'lzma', 'cmath']}

Also, as rdb said, you should perhaps import explicitly cmath in your code even if you’re not using it.

If you could share a snippet of code using pandas ut would help replicating your problem and find what’s missing

Thank you, I corrected the include_modules (my bad, careless reading of docs), now the OSX version works again. I will test on Windows when my new Windows machine arrives.

Meanwhile I redesigned using the csv module instead of pandas. And problems, of course. Works in python, but the build version dies:

UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 3254: ordinal not in range(128)

source code has these lines (fault on the for loop):

datfile = csv.DictReader(open(‘topics/’+self.currentTopic+’.csv’,“r”))
for row in datfile:

I’ll get back to it tomorrow with fresh eyes.

I think the snippet of code that causes the problem with pandas is:

import pandas._libs.tslibs.base
import pandas as pd
…
self.Data = self.cleanupData(pd.read_csv (r’topics/’+self.currentTopic+’.csv’))

That is the only use of pandas. But that works now for OSX (unkown for Windows and Linux) with

'include_modules': {'*':['pandas','lzma','cmath']},

With my new windows system, I have a log file that is not a lot of help to me. It runs fine on command line python,

Traceback (most recent call last):
File “main”, line 15, in
File “importlib._bootstrap”, line 1007, in _find_and_load
File “importlib._bootstrap”, line 986, in _find_and_load_unlocked
File “importlib._bootstrap”, line 680, in _load_unlocked
File “importlib._bootstrap”, line 838, in exec_module
File “direct.showbase.ShowBase”, line 40, in
File “importlib._bootstrap”, line 1007, in _find_and_load
File “importlib._bootstrap”, line 986, in _find_and_load_unlocked
File “importlib._bootstrap”, line 680, in _load_unlocked
File “importlib._bootstrap”, line 838, in exec_module
File “panda3d.core”, line 1, in
File “imp”, line 342, in load_dynamic
File “importlib._bootstrap”, line 711, in _load
File “importlib._bootstrap”, line 666, in _load_unlocked
File “importlib._bootstrap”, line 565, in module_from_spec
File “importlib._bootstrap_external”, line 1108, in create_module
File “importlib._bootstrap”, line 228, in _call_with_frames_removed
ImportError: DLL load failed while importing core: The specified procedure could not be found.

python is 3.9
panda3d is 1.10.8
numpy is 1.19.3 (to avoid the sanity check windows problem)
Setup.py:
from setuptools import setup

setup(
    name="Museum",
    options = {
        'build_apps': {
            'gui_apps': {'Museum': 'Maze.py'},
            # 'platforms': 'macosx_10_9_x86_64',
            'include_patterns': [
                '**/*.png',
                '**/*.jpg',
                '**/*.egg',
                '**/*.bam',
                '**/*.csv',
                '**/*.ogg',
            ],
            'include_modules': {'*':['pandas','lzma','cmath']},
            'log_filename': '$USER_APPDATA/Museum/museum.log',
            'log_append': False,
            'plugins': [
                'pandagl',
                'p3openal_audio',
            ],
        }
    }
)

requirements.txt
panda3d
numpy
pandas
requests
bcrypt
cryptography
pep517
(also tried with numpy==1.19.3 when I first got the sanity check error but reinstalled numpy and no longer needed)

I haven’t done Windows for a few years, so there could be a config error in the way I set everything up.

Hum, weird !

I had exactly the same problem two weeks ago, but I could never reproduce it when I tried to investigate :confused: My assumption at that time was that either one of the wheels was corrupted or the build used some old stuff i did not update properly…

Could you try and remove the whole build/ directory and, if possible, your pip cache before building your app again?

1 Like

[SOLVED] Thank you, that did it. I delete the build directory but instead of bypassing cache on pip, I use

numpy==1.19.3

Looking good, versions are on my server (and I tested downloading, unpacking and running). Still have not tested the linux build.

I also was able to eliminate the line in setup.py:
‘include_modules’: {’*’:[‘pandas’,‘lzma’,‘cmath’]},
by changing my import statement to
from pandas import read_csv

But still seem to need:
import pandas._libs.tslibs.base

Now, if I can figure out how to put it in a browser…

Glad to see it work on Windows :slight_smile: !

A couple of problems I noticed, though:

  • the mouse is not constrained to the window, which is a bit annoying when trying to look around with the mouse (relative mouse mode doesn’t work on Windows, I believe, so this would require some fallback code);
  • it’s possible to click the buttons at the top of the window, which doesn’t seem to be handled, as it makes the application crash with the following output in the log file:
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
rebuilding walls
setting wall: 0:4
setting wall: 1:4
setting wall: 2:4
setting wall: 3:4
setting stars: 0
received data node
received dnode
received player node
setting stars: 0
new topic: Europe_1340-1519
rebuilding walls
arrived set_topic
setting topic: Europe_1340-1519
changing to: Europe_1340-1519
# Data items: 37
image 0: peasants_revolt_England
filling rooms
description 0: 37
cleaning image: Decameron
cleaning image: Start_of_100_year_war
cleaning image: Notre_Dame_de_Paris
cleaning image: First_printed_music
cleaning image: Battle_of_Poitiers
cleaning image: End_of_Plantagenets
cleaning image: End_of_100_year_war
cleaning image: Bonfire_of_the_Vanities
cleaning image: Ottomans_in_Europe
cleaning image: da_Vinci_Last_Supper
cleaning image: Birth_Of_Venus.jpg
cleaning image: Columbus_lands_in_West_Indies
cleaning image: Commons_Parliament
cleaning image: Battle_of_Crecy
cleaning image: Gutenberg_press
cleaning image: Fall_of_Constantinople
cleaning image: peasants_revolt_England
cleaning image: Timur_conquers
cleaning image: Great_Schism
cleaning image: Jeanne_dArc
cleaning image: Battle_of_Agincourt
cleaning image: Alhambra_palace
cleaning image: Black_death_in_Europe
cleaning image: Martin_Luther_95_theses
cleaning image: Magellan_leaves_Spain_to_circle_globe
cleaning image: Savonarola_in_Florence
cleaning image: Copernicus_writes_Commentariolus
cleaning image: Michelangelo_David
cleaning image: da_Vinci_Mona_Lisa
cleaning image: Battle_of_Sluys
cleaning image: Wycliffe_English_Bible
cleaning image: Brunelleschis_dome
cleaning image: Allegoria_della_Primavera.jpg
cleaning image: Sistine_Chapel_ceiling
cleaning image: Alhambra_Decree
cleaning image: Canterbury_Tales
rooms: {'00': [28, 27, 8, 11], '01': [26, 13, 16, 18], '10': [29, 14, 17, 30], '02': [31, 0, 10, 12], '11': [32, 15, 21, 7], '20': [1, 33, 9, 35], '12': [34, 3, 2, 19], '21': [20, 22, 25, 23], '22': [24, 6, 5, 4]}
first wrong room: 11#3
wrong room: 20
adjusting room: 11:20:0:1
adjusting room: 20:11:3:7
wrong rooms: {'11': '3#20#0', '20': '0#11#3'}
current rooms: {'00': [28, 27, 8, 11], '01': [26, 13, 16, 18], '10': [29, 14, 17, 30], '02': [31, 0, 10, 12], '11': [32, 15, 21, 1], '20': [7, 33, 9, 35], '12': [34, 3, 2, 19], '21': [20, 22, 25, 23], '22': [24, 6, 5, 4]}
received dnode
rebuilding walls
setting wall: 0:4
setting wall: 1:4
setting wall: 2:4
setting wall: 3:4
showing help: Europe_1340-1519:0
description 0: 37
starting game
roomid received: 11
rebuilding walls
wall inums assigned: 11:[32, 15, 21, 1]
wall inums correct: 11:[32, 15, 21, 7]
room data: [32, 15, 21, 1]
set image inums: [32, 15, 21, 1]
setting wall: 0:4
setting wall: 1:4
setting wall: 2:4
setting wall: 3:4
collision door: doorS:2
door string: 2
is valid: 2:S
collision: True
is valid: 2:S
getting next room: 11:2:21
roomid received: 21
rebuilding walls
wall inums assigned: 21:[20, 22, 25, 23]
wall inums correct: 21:[20, 22, 25, 23]
room data: [20, 22, 25, 23]
set image inums: [20, 22, 25, 23]
setting wall: 0:4
setting wall: 1:4
setting wall: 2:4
setting wall: 3:4
Traceback (most recent call last):
  File "direct.showbase.EventManager", line 49, in eventLoopTask
  File "direct.showbase.EventManager", line 43, in doEvents
  File "direct.showbase.EventManager", line 99, in processEvent
  File "direct.showbase.Messenger", line 337, in send
  File "direct.showbase.Messenger", line 422, in __dispatch
  File "direct.gui.DirectButton", line 107, in commandFunc
TypeError: dummy() takes 2 positional arguments but 5 were given
:task(error): Exception occurred in PythonTask eventManager
Traceback (most recent call last):
  File "__main__", line 314, in <module>
  File "direct.showbase.ShowBase", line 3325, in run
  File "direct.task.Task", line 541, in run
  File "direct.task.Task", line 495, in step
  File "direct.showbase.EventManager", line 49, in eventLoopTask
  File "direct.showbase.EventManager", line 43, in doEvents
  File "direct.showbase.EventManager", line 99, in processEvent
  File "direct.showbase.Messenger", line 337, in send
  File "direct.showbase.Messenger", line 422, in __dispatch
  File "direct.gui.DirectButton", line 107, in commandFunc
TypeError: dummy() takes 2 positional arguments but 5 were given
  • The next time I tried to run it, it crashed at the end of the image loading process when trying to connect to your website:
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
rebuilding walls
setting wall: 0:4
setting wall: 1:4
setting wall: 2:4
setting wall: 3:4
setting stars: 0
received data node
received dnode
received player node
setting stars: 0
new topic: Europe_1340-1519
rebuilding walls
arrived set_topic
setting topic: Europe_1340-1519
changing to: Europe_1340-1519
# Data items: 37
image 0: peasants_revolt_England
filling rooms
description 0: 37
cleaning image: First_printed_music
cleaning image: Allegoria_della_Primavera.jpg
cleaning image: Great_Schism
cleaning image: da_Vinci_Mona_Lisa
cleaning image: Black_death_in_Europe
cleaning image: Commons_Parliament
cleaning image: peasants_revolt_England
cleaning image: Battle_of_Poitiers
cleaning image: Alhambra_palace
cleaning image: Savonarola_in_Florence
cleaning image: Columbus_lands_in_West_Indies
cleaning image: Timur_conquers
cleaning image: Brunelleschis_dome
cleaning image: Start_of_100_year_war
cleaning image: End_of_100_year_war
cleaning image: Sistine_Chapel_ceiling
cleaning image: da_Vinci_Last_Supper
cleaning image: Birth_Of_Venus.jpg
cleaning image: Bonfire_of_the_Vanities
cleaning image: Battle_of_Sluys
cleaning image: Battle_of_Agincourt
cleaning image: Durers_Rhinoceros_1515.jpg
cleaning image: Wycliffe_English_Bible
cleaning image: Gutenberg_press
cleaning image: Jeanne_dArc
cleaning image: Alhambra_Decree
cleaning image: Ottomans_in_Europe
cleaning image: Notre_Dame_de_Paris
cleaning image: Martin_Luther_95_theses
cleaning image: Copernicus_writes_Commentariolus
cleaning image: Magellan_leaves_Spain_to_circle_globe
cleaning image: Fall_of_Constantinople
cleaning image: Canterbury_Tales
cleaning image: Battle_of_Crecy
cleaning image: Michelangelo_David
cleaning image: Decameron
rooms: {'00': [28, 27, 8, 11], '01': [26, 13, 16, 18], '10': [29, 14, 17, 30], '02': [31, 0, 10, 12], '11': [32, 15, 21, 7], '20': [1, 33, 35, 34], '12': [3, 2, 19, 20], '21': [22, 25, 23, 24], '22': [6, 36, 5, 4]}
first wrong room: 11#1
wrong room: 02
adjusting room: 11:02:1:0
adjusting room: 02:11:1:15
wrong rooms: {'11': '1#02#1', '02': '1#11#1'}
current rooms: {'00': [28, 27, 8, 11], '01': [26, 13, 16, 18], '10': [29, 14, 17, 30], '02': [31, 15, 10, 12], '11': [32, 0, 21, 7], '20': [1, 33, 35, 34], '12': [3, 2, 19, 20], '21': [22, 25, 23, 24], '22': [6, 36, 5, 4]}
received dnode
rebuilding walls
setting wall: 0:4
setting wall: 1:4
setting wall: 2:4
setting wall: 3:4
showing help: Europe_1340-1519:0
description 0: 37
Traceback (most recent call last):
  File "urllib3.connection", line 169, in _new_conn
  File "urllib3.util.connection", line 96, in create_connection
  File "urllib3.util.connection", line 86, in create_connection
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "urllib3.connectionpool", line 699, in urlopen
  File "urllib3.connectionpool", line 394, in _make_request
  File "urllib3.connection", line 234, in request
  File "http.client", line 1255, in request
  File "http.client", line 1301, in _send_request
  File "http.client", line 1250, in endheaders
  File "http.client", line 1010, in _send_output
  File "http.client", line 950, in send
  File "urllib3.connection", line 200, in connect
  File "urllib3.connection", line 181, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x00000195F59681F0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests.adapters", line 439, in send
  File "urllib3.connectionpool", line 755, in urlopen
  File "urllib3.util.retry", line 573, in increment
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='www.ideategames.org', port=80): Max retries exceeded with url: /dcims/Battle_of_Poitiers.jpg (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000195F59681F0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Topics", line 519, in load_image_queue
  File "Topics", line 493, in load_image_from_queue
  File "requests.api", line 76, in get
  File "requests.api", line 61, in request
  File "requests.sessions", line 542, in request
  File "requests.sessions", line 655, in send
  File "requests.adapters", line 516, in send
requests.exceptions.ConnectionError: HTTPConnectionPool(host='www.ideategames.org', port=80): Max retries exceeded with url: /dcims/Battle_of_Poitiers.jpg (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000195F59681F0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
:task(error): Exception occurred in PythonTask Next Image
Traceback (most recent call last):
  File "urllib3.connection", line 169, in _new_conn
  File "urllib3.util.connection", line 96, in create_connection
  File "urllib3.util.connection", line 86, in create_connection
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "urllib3.connectionpool", line 699, in urlopen
  File "urllib3.connectionpool", line 394, in _make_request
  File "urllib3.connection", line 234, in request
  File "http.client", line 1255, in request
  File "http.client", line 1301, in _send_request
  File "http.client", line 1250, in endheaders
  File "http.client", line 1010, in _send_output
  File "http.client", line 950, in send
  File "urllib3.connection", line 200, in connect
  File "urllib3.connection", line 181, in _new_conn
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x00000195F59681F0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests.adapters", line 439, in send
  File "urllib3.connectionpool", line 755, in urlopen
  File "urllib3.util.retry", line 573, in increment
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='www.ideategames.org', port=80): Max retries exceeded with url: /dcims/Battle_of_Poitiers.jpg (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000195F59681F0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "__main__", line 314, in <module>
  File "direct.showbase.ShowBase", line 3325, in run
  File "direct.task.Task", line 541, in run
  File "direct.task.Task", line 495, in step
  File "Topics", line 519, in load_image_queue
  File "Topics", line 493, in load_image_from_queue
  File "requests.api", line 76, in get
  File "requests.api", line 61, in request
  File "requests.sessions", line 542, in request
  File "requests.sessions", line 655, in send
  File "requests.adapters", line 516, in send
requests.exceptions.ConnectionError: HTTPConnectionPool(host='www.ideategames.org', port=80): Max retries exceeded with url: /dcims/Battle_of_Poitiers.jpg (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000195F59681F0>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

Oops (on the buttons), silly mistake. They aren’t buttons, just used that for the look and forgot to send them to dummy.

But the real problem seems to be fetching images from the server. Have to put in recovery code for failed connection.

Mouse constraining is a problem, especially on Windows. Not much of a problem on mac, so I didn’t think it was so bad until I got it working on windows. I haven’t see a ‘mouse capture’ routine that other frameworks have, but something to dig deeper on.

Setting my ‘reset the mouse’ routine at 80% width seems to avoid almost all the escape. Seems to be a good solution. Thanks for pushing me on that.

I trapped the false buttons (I know, I should use visual design instead of fake buttons, but haven’t got to visual design yet), extended the timeout for image fetch for now, (I know I need to put in a more graceful exit), and caught mouse roaming at 80%, should trap better. I changed ESC during image load to exit the game.

Still a bug in that there seems to be always 1 blank wall somewhere. There should not be any.

Thanks for your help and suggestions.