Comments (6)
Thank you for helping.
I tried in 3.9.2 , without venv, then virtual will system packages, then a clean virtual, same issue.
I did also try on 3.7.3 running on the Rpi where it is supposed to be used, and it worked fine there.
So it's only hard to set it up in my pycharm/workstation where I will program.
from suntime.
I tried it on Python 3.9.6
with suntime 1.2.5
and didn't have any problems. You didn't provide any environment details, so I don't know if it could be a problem with it, but I can provide some advice, it could be helpful.
It is usually a good practice to use virtual environments, because they can provide better dependency handling, better project reproducibility, and better portability. Fortunately, venv is now standard in Python, so you should be up and running right away.
Here is the full journey, from zero to hero with the example from README.md
(don't worry about the pip version warning though):
$ python3 -m venv test_venv
$ cd test_venv
$ source ./bin/activate
$ pip3 install suntime
Collecting suntime
Using cached suntime-1.2.5-py3-none-any.whl (7.2 kB)
Collecting python-dateutil
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting six>=1.5
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, python-dateutil, suntime
Successfully installed python-dateutil-2.8.2 six-1.16.0 suntime-1.2.5
WARNING: You are using pip version 21.1.3; however, version 21.2.4 is available.
You should consider upgrading via the '/home/jazz/Data/code_local/scratchbooks/python_scratchbook/test_venv/bin/python3 -m pip install --upgrade pip' command.
$ mkdir src
$ vim src/main.py
$ # copied and pasted the example from README.md from suntime repo
$ python3 src/main.py
Today at Warsaw the sun raised at 03:37 and get down at 17:38 UTC
On 2014-10-03 the sun at Warsaw raised at 06:39 and get down at 18:10.
Error: The sun never rises on this location (on the specified date).
$ python3 --version
Python 3.9.6
$ pip3 --version
pip 21.1.3 from /home/jazz/Data/code_local/scratchbooks/python_scratchbook/test_venv/lib/python3.9/site-packages/pip (python 3.9)
As you can see, all the necessary things for this project to work are in the test_venv
directory. Don't forget to source ./bin/activate
and deactivate
afterwards, but you can always read about it (and more) in the docs.
from suntime.
I'm getting the same issue on Python 3.10. Is there a compatibility issue?
from suntime.
same on 3.9.7 too.
from suntime.
If the name of your script is suntime.py, try renaming it to something else. This worked for me on Windows 10 with Python 3.9.5.
from suntime.
yep, that's most likely what caused this - I remember to have seen something similar long time ago.
Thank you.
from suntime.
Related Issues (16)
- ValueError on corner case
- Local Sunset time wrong when UTC sunset is in following day HOT 8
- Sunrise after sunset for NZ coordinates HOT 5
- Did suntime change? HOT 2
- North and south latitude problems HOT 4
- Big issue of suntime HOT 3
- Inconsistent sunrise times between neighbouring zones HOT 5
- Sunrise local time is out by 1 hour a day before daylight savings starts. Sunset is correct.
- Bug in day wrap for sunset times HOT 2
- No seconds calculations? HOT 1
- Buglet in example HOT 1
- Update datetime with current date HOT 1
- Publish on PiPy HOT 1
- Another ValueError on corner case HOT 1
- Tests
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 suntime.