Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 25 17:20
    scala-steward closed #434
  • Nov 25 17:20
    scala-steward commented #434
  • Nov 25 17:20
    scala-steward opened #440
  • Nov 24 19:02
    my-lab-23 starred DanielaSfregola/twitter4s
  • Nov 11 19:24
    scala-steward closed #65
  • Nov 11 19:24
    scala-steward commented #65
  • Nov 11 19:24
    scala-steward opened #67
  • Nov 08 14:47
    RaphaelSilv starred DanielaSfregola/twitter4s
  • Nov 02 17:38
    scala-steward opened #439
  • Nov 01 15:23
    scala-steward closed #62
  • Nov 01 15:23
    scala-steward commented #62
  • Nov 01 15:23
    scala-steward opened #66
  • Nov 01 15:23
    scala-steward opened #438
  • Oct 26 17:15
    lmyslinski closed #243
  • Oct 24 00:14
    scala-steward opened #437
  • Oct 19 19:53
  • Oct 18 15:50

    DanielaSfregola on main

    Properly encode parentheses Merge pull request #436 from ca… (compare)

  • Oct 18 15:50
    DanielaSfregola closed #436
  • Oct 18 14:01
    carterwalsh edited #436
  • Oct 18 13:58
    carterwalsh opened #436
Daniela Sfregola
@DanielaSfregola
how do you run your application? using the terminal? or using an IDE such as intellij?
karim khalfaoui
@Kaiiim
in intelij
Daniela Sfregola
@DanielaSfregola
in intellji you need to access the run configurations and add the env variables there...have you done that?
btw, you will need 4 env variables, not just one :)
Also, why do you need 2 streaming clients? i.e. why do you need line 42?
karim khalfaoui
@Kaiiim
i've added the env variable on iterm application (terminal for mac). and in intelij when i try env i saw variable (the 4 variables)
Daniela Sfregola
@DanielaSfregola
what happens if you open a new terminal and type: printenv | grep TWITTER
karim khalfaoui
@Kaiiim
i suppose i need to create "restClient" and "streamingClient" and after "client" ?
i can see the 4 values
Daniela Sfregola
@DanielaSfregola
nah, you need either streamingClient or client
karim khalfaoui
@Kaiiim
ahhhh !
Daniela Sfregola
@DanielaSfregola
what happens if you delete client?
karim khalfaoui
@Kaiiim
it's like this I do a while 1
no error
Daniela Sfregola
@DanielaSfregola
nice :)
karim khalfaoui
@Kaiiim
I thought that i need to initialise client after !
sorry :/
:)
Daniela Sfregola
@DanielaSfregola
ok, your problem is actually not twitter4s, but it is related to your setup: your iterm env variables are not accessible to intellji
unfortunately I do not use iterm, so I cannot help with that
karim khalfaoui
@Kaiiim
when i print env | grep TWITTER i can see 4 value on intelij
in the terminal to intelij
Daniela Sfregola
@DanielaSfregola
....but it seems like you already have the tokens in your code, so that should be enough to get you going :)
it probably depends on the run configuration of your program in Intellji
karim khalfaoui
@Kaiiim
yes. Do you have a tips if i want to get the hashtag ? for send all in kafka and after get top 3 hastag in last hour
Daniela Sfregola
@DanielaSfregola
have a look at https://github.com/DanielaSfregola/twitter4s-demo: I think we have a few examples of people working with hashtags
karim khalfaoui
@Kaiiim
thanks a lot daniela ! :)
Daniela Sfregola
@DanielaSfregola
but no kafka examples... :P
np
karim khalfaoui
@Kaiiim
kafka is after, first i need to get hastag :p
:)
Soren
@srnb_gitlab
@DanielaSfregola I'm getting java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI trying to publishLocal on my machine after fixing #341
or rather, I'm attempting to fix #341
[error] java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI
[error] java.base/jdk.internal.jrtfs.JrtPath.toUri(JrtPath.java:176)
[error] scala.tools.nsc.classpath.JrtClassPath.asURLs(DirectoryClassPath.scala:216)
[error] scala.tools.nsc.classpath.AggregateClassPath.$anonfun$asURLs$1(AggregateClassPath.scala:63)
[error] scala.collection.StrictOptimizedIterableOps.flatMap(StrictOptimizedIterableOps.scala:118)
[error] scala.collection.StrictOptimizedIterableOps.flatMap$(StrictOptimizedIterableOps.scala:105)
[error] scala.collection.immutable.Vector.flatMap(Vector.scala:113)
[error] scala.tools.nsc.classpath.AggregateClassPath.asURLs(AggregateClassPath.scala:63)
[error] scala.tools.nsc.plugins.Plugins.findMacroClassLoader(Plugins.scala:184)
[error] scala.tools.nsc.plugins.Plugins.findMacroClassLoader$(Plugins.scala:178)
[error] scala.tools.nsc.Global.findMacroClassLoader(Global.scala:46)
[error] scala.reflect.macros.runtime.MacroRuntimes.$anonfun$defaultMacroClassloaderCache$1(MacroRuntimes.scala:58)
[error] scala.reflect.internal.SymbolTable$perRunCaches$$anon$3.apply(SymbolTable.scala:481)
[error] scala.reflect.macros.runtime.MacroRuntimes.defaultMacroClassloader(MacroRuntimes.scala:59)
[error] scala.reflect.macros.runtime.MacroRuntimes.defaultMacroClassloader$(MacroRuntimes.scala:59)
[error] scala.tools.nsc.Global$$anon$5.defaultMacroClassloader(Global.scala:482)
[error] scala.reflect.macros.runtime.MacroRuntimes$MacroRuntimeResolver.resolveRuntime(MacroRuntimes.scala:77)
[error] scala.reflect.macros.runtime.MacroRuntimes.$anonfun$standardMacroRuntime$3(MacroRuntimes.scala:50)
[error] scala.collection.mutable.MapOps.getOrElseUpdate(Map.scala:149)
[error] scala.collection.mutable.MapOps.getOrElseUpdate$(Map.scala:146)
[error] scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:260)
[error] scala.reflect.macros.runtime.MacroRuntimes.standardMacroRuntime(MacroRuntimes.scala:50)
the stack trace goes on for a lot longer than this
Daniela Sfregola
@DanielaSfregola
Thanks @srnb_gitlab! Do you have a branch that I could look at?
Soren
@srnb_gitlab
@DanielaSfregola I fixed it by using sbt-extras and running SBT with JDK 8 instead of JDK 14
As for a fix to #341, I just added 3 lines of Option myself and my program runs fine
diff --git a/src/main/scala/com/danielasfregola/twitter4s/entities/User.scala b/src/main/scala/com/danielasfregola/twitter4s/entities/User.scala
index 00633cab..153405cd 100755
--- a/src/main/scala/com/danielasfregola/twitter4s/entities/User.scala
+++ b/src/main/scala/com/danielasfregola/twitter4s/entities/User.scala
@@ -22,15 +22,15 @@ final case class User(blocked_by: Boolean = false,
                       id_str: String,
                       is_translation_enabled: Boolean = false,
                       is_translator: Boolean = false,
-                      lang: String,
+                      lang: Option[String],
                       listed_count: Int,
                       location: Option[String] = None,
                       muting: Boolean = false,
                       name: String,
                       notifications: Boolean = false,
                       profile_background_color: String,
-                      profile_background_image_url: String,
-                      profile_background_image_url_https: String,
+                      profile_background_image_url: Option[String],
+                      profile_background_image_url_https: Option[String],
                       profile_background_tile: Boolean = false,
                       profile_banner_url: Option[String] = None,
                       profile_image_url: ProfileImage,
Daniela Sfregola
@DanielaSfregola
I am glad! @srnb_gitlab would you be willing to make a PR, so that we can fix it in the twitter4s branch and do a release to fix it for everyone?
Soren
@srnb_gitlab
Sounds good @DanielaSfregola! I should have a PR by tonight when I'm on my Linux machine again
Daniela Sfregola
@DanielaSfregola
awesome, thank you :)
Soren
@srnb_gitlab
Sorry for not getting on this. It should be up within the next 24 hours. Been half-busy, half-procrastinating :/
Daniela Sfregola
@DanielaSfregola
no worries @srnb_gitlab! :)
Soren
@srnb_gitlab
I keep on forgetting! :weary: