Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The app crashes whenever I try to generate the schedule #6

Open
TheImperialOne opened this issue Jan 31, 2024 · 1 comment
Open

The app crashes whenever I try to generate the schedule #6

TheImperialOne opened this issue Jan 31, 2024 · 1 comment

Comments

@TheImperialOne
Copy link

TheImperialOne commented Jan 31, 2024

When I set all the things such as classrooms, instructors, subjects, and sections and try to generate the schedule, the application crashes, with the following exit code:
Process finished with exit code -1073740791 (0xC0000409)`
I have been running this project in Pycharm with Python 3.12.1

This problem occurs even with the simplest and most basic constraints, for example, I had assigned only 1 instructor to a single classroom with a single subject to a single section, but the app still crashes.

Below is the debug report:
`import sys; print('Python %s on %s' % (sys.version, sys.platform))
D:\GAUCS\venv\Scripts\python.exe -X pycache_prefix=C:\Users\anike\AppData\Local\JetBrains\PyCharmCE2023.3\cpython-cache "D:/IDEs/PyCharm Community Edition 2023.3.3/plugins/python-ce/helpers/pydev/pydevd.py" --multiprocess --qt-support=auto --client 127.0.0.1 --port 54640 --file D:\GAUCS\main.py
Connected to pydev debugger (build 233.13763.11)
Traceback (most recent call last):
File "D:\IDEs\PyCharm Community Edition 2023.3.3\plugins\python-ce\helpers\pydev_pydev_bundle\pydev_monkey_qt.py", line 237, in _new_run
return self._original_run()
^^^^^^^^^^^^^^^^^^^^
File "D:\GAUCS\components\GeneticAlgorithm.py", line 759, in run
self.initialization()
File "D:\GAUCS\components\GeneticAlgorithm.py", line 51, in initialization
self.generateChromosome(self.settings['minimum_population'])
File "D:\GAUCS\components\GeneticAlgorithm.py", line 90, in generateChromosome
self.generateSubjectPlacementsForSections(sections)
File "D:\GAUCS\components\GeneticAlgorithm.py", line 112, in generateSubjectPlacementsForSections
result = self.generateSubjectPlacement([section], subjectList[subjectToPlace])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\GAUCS\components\GeneticAlgorithm.py", line 150, in generateSubjectPlacement
timeDetails = self.selectTimeDetails(subject, forceRandomMeeting)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\GAUCS\components\GeneticAlgorithm.py", line 202, in selectTimeDetails
meetingPattern = np.random.choice(meetingPatterns)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "numpy\random\mtrand.pyx", line 937, in numpy.random.mtrand.RandomState.choice
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.

Please help me with this issue

@mjishnu
Copy link

mjishnu commented May 29, 2024

should be fixed by #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants