Python Forum
Problem with importing and using collections module
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with importing and using collections module
#1
Greatings,

I am a new to python and actually whole concept of programming.

Since last one one month i have been working hard but getting stuck many times because training material i have are from instructors who made it on python 2.

I am learning to create a base file for my games references.

I have import collections module

import collections

then while creating vector i used it

class vector(collection.Sequence)

and now the problem start. whenever i tried using vector class for my game but i have error:

Traceback (most recent call last):
File "d:/pYtHON/Pythongames/base.py", line 18, in <module>
class vector(collection.Sequence):
NameError: name 'collection' is not defined

Please share resolution with little explanation to understand it for future reference. Thank You. Smile
Reply


Messages In This Thread
Problem with importing and using collections module - by pythomdummy - Nov-13-2019, 06:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem with memory_graph module akbarza 3 422 Mar-04-2024, 10:15 AM
Last Post: snippsat
  importing variables from module 8376459 1 306 Feb-18-2024, 02:24 PM
Last Post: deanhystad
  problem using coloeama module akbarza 3 620 Jan-08-2024, 07:31 AM
Last Post: akbarza
  no module named 'docx' when importing docx MaartenRo 1 982 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  problem in using subprocess module akbarza 5 1,091 Sep-24-2023, 02:02 PM
Last Post: snippsat
  problem in import module from other folder akbarza 5 1,539 Sep-01-2023, 07:48 AM
Last Post: Gribouillis
  problem in using pyqrcode module to create QRcode akbarza 9 2,113 Aug-23-2023, 04:17 PM
Last Post: snippsat
  Problem with Pyinstaller. No module named '_tkinter' tonynapoli2309 0 1,054 May-15-2023, 02:38 PM
Last Post: tonynapoli2309
  Problem with importing python-telegram library into the project gandonio 1 1,617 Nov-01-2022, 02:19 AM
Last Post: deanhystad
  My code displays too much output when importing class from a module lil_e 4 1,197 Oct-22-2022, 12:56 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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