Coder Social home page Coder Social logo

Comments (6)

Coimbra1984 avatar Coimbra1984 commented on June 20, 2024

The problem is probably python 2.7. Can you use python 3?

from toggl2clockify.

WvdW avatar WvdW commented on June 20, 2024

I updated to python 3.6.7-1 and ran it again. Its now going past the initial key error but as soon as it gets to phase 3 (import projects) then it fails with the error:
WARNING - Clue - error adding user XXX to clockify project, msg=User XXX not found in workspace XXX

The user does exist with the exact same email address, has been marked as admin on both sides, I ensured that the profile name is exactly the same on both sides, as well as the workspace name (including capitalisation). The workspace name has ' in the name. Could that perhaps be throwing it?

It runs through the whole phase 3 but shows the same error line for every project it tries to add the user to. In the end it completes phase 3 but all records failed and nothing gets added to Clockify.

Phase 4 (import time entries) starts but it fails with the following error for each of the imported time entries for user 1:
WARNING - ClockifyAPI - user XXX not found
When it starts with user 2's time entries then the .py script starts failing in several of its lines with errors.

I have run the script several times and every time it got a little further than the previous time but it doesn't want to proceed at all past the failures of phase 4.

from toggl2clockify.

Coimbra1984 avatar Coimbra1984 commented on June 20, 2024

Okay, let's try to solve the first WARNING first.
The tool first tries to resolve all clockify keys, can you check again that you get the output:
testing clockify APIKey XXXXX
...ok, key resolved to email [email protected]
Also a file called clockify_users.json should be created in the same folder, can you also open that file and check the content.
The emails must also match exactly (lower/UPPER case).
The ' in the workspace name should not be a problem.
Most helpful should be the content of clockify_users.json This file contains all the users found in the given workspace, you must see the corresponding user in that file.

from toggl2clockify.

WvdW avatar WvdW commented on June 20, 2024

Yes, good call. That seems to have resolved it. On the Toggl side the primary email address started with an uppercase and on the Clockify side it had a lower case. Thanks :)

Some observations that might be worth noting in your "preparing the environment" instructions:

  • Open Toggl and Clockify side-by-side and compare the Workspace and Profile settings to ensure they both match up exactly prior to running the script
  • The Workspace owner's email address must be the exact same on both sides (including capitalization)
  • Rename the Workspace name on both sides to something simple without any apostrophes or special characters
  • The script is very sensitive to a stable network connection and sufficient bandwidth speed otherwise it times out
  • Run a test migration just with the Workspace owner's API key on the Clockify side first. If that completes successfully but with warnings for the other missing users then you can run the migration a second time with all of the others users' Clockify API keys also included in the config.json file.
  • Don't be afraid to run the script several times as you make changes to the config.json file. It will just skip over existing content and fill in whatever blanks there may be.

Thanks for your effort in writing this script! It has saved many hours of having to manually migrate content.

from toggl2clockify.

scottrobertson avatar scottrobertson commented on June 20, 2024

Getting this too. When i try and run with python3 i get:

Traceback (most recent call last):
  File "toggl2clockify.py", line 13, in <module>
    import dateutil
ModuleNotFoundError: No module named 'dateutil'

from toggl2clockify.

Coimbra1984 avatar Coimbra1984 commented on June 20, 2024

Okay, this is really strange, because 'dateutil' is a standard python library.
You can try:
sudo apt-get install python3-dateutil
or check if you have pip3 and install it with pip:
pip3 install python-dateutil

from toggl2clockify.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.