Comments (11)
@ihatelogin don't you just hate it when the developer isn't helpful? Sucks I know, but sometimes those developers are just way to busy and simple python scripts are never a priority.
There was a new "--locale" option added to gcalcli. That might help address this issue. If not it is encouraged you take some time to create a github pull request that contains a proper fix.
from gcalcli.
Did you try the latest code in the git master branch?
from gcalcli.
Yes.
I've copied content of https://raw.github.com/insanum/gcalcli/master/gcalcli, but still have the same error.
Oh, just checked right now and from command line i've good response (good calendar) - only when i run gcalcli from conky script i have that issue.
from gcalcli.
OK, so developer wasn't very helpful and I had to find workaround:
- git clone http://www.tablix.org/~avian/git/unidecode.git
- cd unidecode
- sudo python setup.py install
- sudo vi /usr/bin/gcalcli
- above “from Queue import Queue” add “from unidecode import unidecode”
- find “def PrintMsg(color, msg)”, and else statement should look like this "sys.stdout.write(unidecode(msg))"
All thanks goes to "Gilles Lenfant" (http://www.peterbe.com/plog/unicode-to-ascii#c358f0d)
from gcalcli.
Or in PrintMsg function, after every msg one should encode to utf-8, so msg.encode("utf-8") should work properly.
from gcalcli.
Following what is said here: http://stackoverflow.com/questions/8016236/python-unicode-handling-differences-between-print-and-sys-stdout-write
"A better solution might be to replace sys.stdout
with a wrapper". This is accomplished by adding this:
class StdOut(object):
def write(self, string):
if isinstance(string, unicode):
string = string.encode(sys.__stdout__.encoding)
sys.__stdout__.write(string)
sys.stdout = StdOut()
to the part just next to the import
part, for example on line 62 or 63 and on the def PrintMsg(color, msg)
part the else statement should look like sys.stdout.write(msg)
Hope this helps
from gcalcli.
This is probably the same issue I talked about over here in #8 and is likely fixed with b713a8c . Right now I've tagged that as 2.5 milestone as I really need more people then just me to test it. I'm actually inclined to mark this as a duplicate.
from gcalcli.
Got an email that unicode in the month names break the calw and calm output. Don't know if @tresni fix fixes this problem.
from gcalcli.
Probably not, though I think I know where the issue is. I believe the east_asian_width
calls only apply to descriptions, not month/day names so that could definitely be an issue.
from gcalcli.
We should probably filter all terminal output through a single function that does the proper conversions. This unicode stuff has plagued gcalcli for quite some time now. Maybe unifying the output path will help. Thoughts?
from gcalcli.
Agree. I've found a couple other odd output errors. If I set my output width too big (variable depending on terminal window size) and have more one meeting in the day, I get newlines in the output where it shouldn't be...
from gcalcli.
Related Issues (20)
- Can't create an event where a field starts with "@"
- Date Format HOT 1
- when importing a iCS file gcalcli says 'Python vobject module not installed!' even though it is installed HOT 1
- Google Calendar
- Imports are disorganized
- Hourly authentication "The authentication flow has completed."
- Use of summaryOverride HOT 1
- README.md discrepancy
- Importing a .vcs with no events crashes gcalcli
- Formatting and first day of week
- Add option to combine default reminders with custom reminders
- --lineart unicode TypeError: can't concat str to bytes
- App 'gcalcli' is blocked - The out-of-band (OOB) flow has been blocked HOT 8
- DeprecationWarning
- Editing based on unique identifiers?
- Editing an recurring event seems to copy it instead of editing the selected "event instance"
- List Availability
- Access blocked: Authorization Error HOT 1
- HELP: What do I specify? (Documention missing bug)
- HELP!!! GCalCli stopped working! I can only list calendars, and cannot do anything else HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcalcli.