Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with pytmx
#4
Disclaimer: I havent used pytmx in awhile so i am out of the loop at this point. I might be out of date depending on how much he updated pytmx.

Quote:
Error:
AttributeError: module 'pytmx.pytmx' has no attribute 'load_pygame'
Did you put pytmx file in a pytmx directory? What is your file structure? I know at one point he had a pymtx directory with a pytmx file inside. If you copied that directory over you need 2 pytmx, whereas if you copied the file only you only need 1.

Personally i would not use star imports. But if you do, you are bypassing pytmx part of the line.

Assuming you copied only the file over and not the directory, you should be
import pytmx
pytmx.load_pygame()
Here is a game that uses that as an example:
https://github.com/justinmeister/bouncy-...der.py#L14

I have a feeling this is more of an module import issue than anything related specifically to pytmx.
Recommended Tutorials:
Reply


Messages In This Thread
Problems with pytmx - by Piethon - Dec-24-2019, 11:27 AM
RE: Problems with pytmx - by nilamo - Dec-27-2019, 05:01 PM
RE: Problems with pytmx - by Piethon - Dec-29-2019, 08:35 AM
RE: Problems with pytmx - by metulburr - Dec-29-2019, 01:20 PM
RE: Problems with pytmx - by michael1789 - Dec-29-2019, 06:25 PM
RE: Problems with pytmx - by Piethon - Jan-02-2020, 08:47 AM
RE: Problems with pytmx - by metulburr - Jan-02-2020, 12:20 PM
RE: Problems with pytmx - by michael1789 - Jan-02-2020, 03:14 PM
RE: Problems with pytmx - by Piethon - Jan-03-2020, 11:06 AM
RE: Problems with pytmx - by michael1789 - Jan-03-2020, 01:43 PM
RE: Problems with pytmx - by Piethon - Jan-03-2020, 05:55 PM
RE: Problems with pytmx - by michael1789 - Jan-03-2020, 07:13 PM
RE: Problems with pytmx - by Piethon - Jan-04-2020, 08:58 AM
RE: Problems with pytmx - by michael1789 - Jan-04-2020, 06:09 PM
RE: Problems with pytmx - by metulburr - Jan-04-2020, 03:37 PM
RE: Problems with pytmx - by Piethon - Jan-05-2020, 10:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to display isometric maps with pytmx? Piethon 18 10,627 Feb-19-2020, 04:33 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020