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

AttributeError: 'Calendar' object has no attribute '_unused' #44

Closed
gccq opened this issue Oct 26, 2019 · 3 comments
Closed

AttributeError: 'Calendar' object has no attribute '_unused' #44

gccq opened this issue Oct 26, 2019 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@gccq
Copy link

gccq commented Oct 26, 2019

After successfully processing (All months):
get the following error:

Traceback (most recent call last):
File "SRC./fb2cal.py", line 813, in
File "SRC./fb2cal.py", line 126, in main
File "SRC./fb2cal.py", line 782, in populate_birthdays_calendar
AttributeError: 'Calendar' object has no attribute '_unused'

No ICS file is created. (Tried creating both local files as well as google drive)

Not sure whats going on! Can someone help?

@calvinle
Copy link

calvinle commented Oct 26, 2019

Hey @sukrutonline,
After looking into it, ._unused is a function in ics-v0.4. You're likely using v0.6.
(For context, I was running this in Ubuntu bash with Windows Subsystem for Linux). I uninstalled the v0.6 module and replaced it with the v0.4 by running
pip3 uninstall ics
pip3 uninstall ics==0.4
Program executed successfully after that.

That being said, @mobeigi is an update to account for the new ics version possible?

@mobeigi mobeigi added the bug Something isn't working label Oct 27, 2019
@mobeigi
Copy link
Owner

mobeigi commented Oct 27, 2019

The ._unused approach was used to add custom iCal properties to the ICS file since that was the only supported way to do so using the ics module.

It looks like it has been renamed in v0.6:
ics-py/ics-py@79bd497

Docs:
https://icspy.readthedocs.io/en/stable/advanced.html#custom-properties

I think the best approach is to rename the field in fb2cal and update requirements.txt to require v0.6+ (currently it required v0.4+).

@calvinle Care to take out a PR for this? 😄

@gccq
Copy link
Author

gccq commented Oct 27, 2019

Hey @calvinle & @mobeigi,

Thanks for the response!,
After installing v0.4 with your suggestion, It works flawlessly!

pip3 uninstall ics
pip3 install ics==0.4

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants